コード例 #1
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)
コード例 #2
0
ファイル: test_directory.py プロジェクト: CaptainAL/Spyder
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)
コード例 #3
0
def test_resource_directory():
    assert isinstance(
        resource(os.path.join('a', 'nonexistent', 'directory') + os.path.sep),
        _Directory)
コード例 #4
0
ファイル: test_directory.py プロジェクト: CaptainAL/Spyder
def test_resource_directory():
    assert isinstance(resource(os.path.join('a', 'nonexistent', 'directory') +
                               os.path.sep),
                      _Directory)