CoffeaTeam / fsspec-xrootd

An XRootD implementation for fsspec
https://coffeateam.github.io/fsspec-xrootd/
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Make sure storage option actually survives #17

Closed nsmith- closed 2 years ago

ScottDemarest commented 2 years ago

It passes the tests but I don't think the problem is really fixed.

nsmith- commented 2 years ago

I suppose some change to whether a root path is '' or '/' might mess with how the cache logic works?

nsmith- commented 2 years ago

Actually no, I take that back. The tests were failing even with the first commit

ScottDemarest commented 2 years ago

If you skip the test_read, test_append doesn't fail. Whatever is causing test_read to fail is somehow affecting test_append

ScottDemarest commented 2 years ago

It works now! For some reason, moving test_pickle after test_read fixes everything

ScottDemarest commented 2 years ago

It turns out the _ls_from_cache() function returns an empty array if the requested path is in the cache but has no directories beneath it. I added a check for an empty array in _info() to accommodate this and now it passes all tests regardless of the order. I don't fully understand why the test order mattered before but I think it is fixed now.