comparison tests/common.py @ 63:b911a7c01727

add test common functionality
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 Dec 2017 12:37:49 -0800
parents
children 4f197c057e26
comparison
equal deleted inserted replaced
62:ff7719f05f0d 63:b911a7c01727
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