view tests/common.py @ 80:3c7927f59b05

notes to self re deep neural networks
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 Dec 2017 13:43:42 -0800
parents 4f197c057e26
children
line wrap: on
line source

"""
testing common
"""

import os
from tvii 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)