Mercurial > hg > tvii
annotate tests/common.py @ 83:1b61ce99ee82
derivative calculation: midpoint rule
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 17 Dec 2017 13:51:13 -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 |