Skip to content

Commit

Permalink
fix fsspec test due to fsspec upgrade (#93)
Browse files Browse the repository at this point in the history
`fsspec` upgrade in fsspec/filesystem_spec#1329
makes
1. when using a trailing slash in globs, it returns only directories.
2. the double asterisks ** matches 0+ directories.

This PR fix the tests accordingly.
  • Loading branch information
seanses authored Sep 8, 2023
1 parent 62216de commit 579c35e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/pyxet/tests/fsspec_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def test_fsspec():

listing = fs.glob(CONSTANTS.TITANIC_MAIN + '/data/')
print(listing)
assert len(listing) == 2
assert listing == ['xdssio/titanic/main/data/titanic_0.parquet', 'xdssio/titanic/main/data/titanic_1.parquet']
assert len(listing) == 1
assert listing == ['xdssio/titanic/main/data/']

listing = fs.glob(CONSTANTS.TITANIC_MAIN + '/data/*')
print(listing)
Expand All @@ -48,8 +48,8 @@ def test_fsspec():

listing = fs.glob(CONSTANTS.TITANIC_MAIN + '/**/*parquet')
print(listing)
assert len(listing) == 2
assert listing == ['xdssio/titanic/main/data/titanic_0.parquet', 'xdssio/titanic/main/data/titanic_1.parquet']
assert len(listing) == 3
assert listing == ['xdssio/titanic/main/data/titanic_0.parquet', 'xdssio/titanic/main/data/titanic_1.parquet', 'xdssio/titanic/main/titanic.parquet']

listing = fs.glob(CONSTANTS.TITANIC_MAIN + '/titanic*')
print(listing)
Expand Down

0 comments on commit 579c35e

Please sign in to comment.