Ejemplo n.º 1
0
def _test_use_file(elements, by_state):
    if test_util.use_test_files():
        if isinstance(elements, basestring):
            div = "st" if by_state else "dv"
            path = 'ncdc/cirs/climdiv-{elements}{div}-v1.0.0-20140304'.format(
                elements=elements, div=div)
        else:
            path = 'ncdc/cirs/'
        return test_util.get_test_file_path(path)
    else:
        return None
Ejemplo n.º 2
0
def _test_use_file(elements, by_state):
    if test_util.use_test_files():
        if isinstance(elements, basestring):
            if by_state:
                path = 'ncdc/cirs/drd964x.%sst.txt' % elements
            else:
                path = 'ncdc/cirs/drd964x.%s.txt' % elements
        else:
            path = 'ncdc/cirs/'
        return test_util.get_test_file_path(path)
    else:
        return None