Mercurial > hg > tvii
annotate tests/common.py @ 69:0bb36ae047c3
test matrix transposition
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 17 Dec 2017 13:16:16 -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 |