Пример #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