Test using new abstract test harness #713
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds testing using the abstract test harness introduced into
fsspecin fsspec/filesystem_spec#1216. It is not intended to be merged yet, my intention is to leave it as an open PR that I can keep pushing to and rerun the CI as I add more tests tofsspecthat will be picked up here.It demonstrates what is required for a class derived from
fsspec.AbstractFileSystemto inherit and run the new test suite. Thes3fs_test.pyfile will run all tests from thefsspec.Abstract<whatever>Testsby inheriting from them. If a test is not appropriate for thisfsspecimplementation then it would bepytest.skippedin this file. Most of the new code is setting up a filesystem in a repeatable way for the tests, and most of this is copy-and-pasted (with minor modifications) from the directory above. I've duplicated this code rather than importing it from the existing code as I'd like to keep the new tests isolated from the old ones initially. It might be possible to replace all of the old tests with new ones within the new test harness but it is too early to say whether this will be likely yet.This is all very experimental still. We need to add a fairly comprehensive set of tests to this framework before we can be sure that it will work and be easy to maintain.