Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.99 KB

README.md

File metadata and controls

33 lines (21 loc) · 1.99 KB

DataFrame Interchange Protocol Compliance Suite

This suite contains tests for dataframe libraries adopting the Python DataFrame Interchange Protocol. Note it's a work in progress.

What are we testing?

  • Round trips (test_from_dataframe.py):

    1. Creates a dataframe via library 1
    2. Interchanges it via library 2 into a "destination" dataframe
    3. 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).

What the heck is LibraryInfo?

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.

Other testing efforts