Mercurial > hg > tvii
view tests/common.py @ 66:9f1324a59cc1
add bounding box + tests
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 17 Dec 2017 12:48:06 -0800 |
parents | b911a7c01727 |
children | 4f197c057e26 |
line wrap: on
line source
""" testing common """ import os from nettwerk import read here = os.path.dirname(os.path.abspath(__file__)) data = os.path.join(here, 'data') def datafile(*path): """returns path within `tests/data`""" return os.path.join(data, *path) def load(*path, **kwargs): """load a data file""" return read.read(datafile(*path), **kwargs)