Mercurial > hg > tvii
annotate tests/common.py @ 85:d705f6384e8b
i hate namespace conflicts
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 17 Dec 2017 14:03:02 -0800 |
parents | 4f197c057e26 |
children |
rev | line source |
---|---|
63 | 1 """ |
2 testing common | |
3 """ | |
4 | |
5 import os | |
78 | 6 from tvii import read |
63 | 7 |
8 here = os.path.dirname(os.path.abspath(__file__)) | |
9 data = os.path.join(here, 'data') | |
10 | |
11 def datafile(*path): | |
12 """returns path within `tests/data`""" | |
13 | |
14 return os.path.join(data, *path) | |
15 | |
16 def load(*path, **kwargs): | |
17 """load a data file""" | |
18 | |
19 return read.read(datafile(*path), **kwargs) | |
20 |