This suite contains tests for dataframe libraries adopting the Python DataFrame Interchange Protocol. Note it's a work in progress.
-
Round trips (
test_from_dataframe.py):- Creates a dataframe via library 1
- Interchanges it via library 2 into a "destination" dataframe
- Interchanges that resulting dataframe via library 1 into a "roundtrip" dataframe
We assert the roundtrip dataframe is equivalent to the original dataframe.
-
Signatures (
test_signatures.py): Assert methods have the correct signatures. -
Basic functionality (e.g.
test_dataframe_object.py): Smoke methods can take valid input, and assert they return valid output (where appropiate).
Tests don't access the dataframe libraries directly, but wrappers defined in wrappers.py in the form of a LibraryInfo object. This allows us to standardise how these libraries work, so we can ignore implementation details when writing our tests.
For test functions which take a libinfo argument, we use the pytest_generate_tests hook in conftest.py to automatically parametrize it with every dataframe library installed in the user's environment.