示例#1
0
def test_get_first_gldas_folder_no_folder():
    path = os.path.join(os.path.dirname(__file__),
                        'folder_test', 'failure')
    last = get_first_gldas_folder(path, ['{:%Y}', '{:%j}'])
    last_should = None
    assert last == last_should
示例#2
0
def test_get_first_gldas_folder():
    path = os.path.join(os.path.dirname(__file__),
                        'folder_test', 'success')
    last = get_first_gldas_folder(path, ['{:%Y}', '{:%j}'])
    last_should = os.path.join(path, "2013", "001")
    assert last == last_should
示例#3
0
def test_get_first_gldas_folder_no_folder():
    path = os.path.join(os.path.dirname(__file__), "folder_test", "failure")
    last = get_first_gldas_folder(path, ["{time:%Y}", "{time:%j}"])
    last_should = None
    assert last == last_should
示例#4
0
def test_get_first_gldas_folder():
    path = os.path.join(os.path.dirname(__file__), "folder_test", "success")
    last = get_first_gldas_folder(path, ["{time:%Y}", "{time:%j}"])
    last_should = os.path.join(path, "2013", "001")
    assert last == last_should
示例#5
0
def test_get_first_gldas_folder_no_folder():
    path = os.path.join(os.path.dirname(__file__),
                        'folder_test', 'failure')
    last = get_first_gldas_folder(path, ['{time:%Y}', '{time:%j}'])
    last_should = None
    assert last == last_should
示例#6
0
def test_get_first_gldas_folder():
    path = os.path.join(os.path.dirname(__file__),
                        'folder_test', 'success')
    last = get_first_gldas_folder(path, ['{time:%Y}', '{time:%j}'])
    last_should = os.path.join(path, "2013", "001")
    assert last == last_should