Mercurial > hg > tvii
annotate tests/common.py @ 64:2adeb95cf4d5
add more useful software + an idea
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 17 Dec 2017 12:41:26 -0800 |
parents | b911a7c01727 |
children | 4f197c057e26 |
rev | line source |
---|---|
63 | 1 """ |
2 testing common | |
3 """ | |
4 | |
5 import os | |
6 from nettwerk import read | |
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 |