def test_resource_directory():
    with csvs() as path:
        r = resource(path)
        assert type(r) == Directory(CSV)
        assert r.path.rstrip(os.path.sep) == path.rstrip(os.path.sep)

        r2 = resource(os.path.join(path, '*.csv'))
        assert type(r2) == Directory(CSV)
        assert r2.path.rstrip(os.path.sep) == path.rstrip(os.path.sep)
Beispiel #2
0
def test_resource_directory():
    with csvs() as path:
        r = resource(path)
        assert type(r) == Directory(CSV)
        assert r.path.rstrip(os.path.sep) == path.rstrip(os.path.sep)

        r2 = resource(os.path.join(path, '*.csv'))
        assert type(r2) == Directory(CSV)
        assert r2.path.rstrip(os.path.sep) == path.rstrip(os.path.sep)
def test_resource_directory():
    assert isinstance(
        resource(os.path.join('a', 'nonexistent', 'directory') + os.path.sep),
        _Directory)
Beispiel #4
0
def test_resource_directory():
    assert isinstance(resource(os.path.join('a', 'nonexistent', 'directory') +
                               os.path.sep),
                      _Directory)