Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests independent of implementation #72

Merged
merged 8 commits into from
Apr 22, 2024

Conversation

anmyachev
Copy link
Contributor

@anmyachev anmyachev commented Apr 19, 2024

This pull request adds new entities to test utilities that allow us to hide library details from tests: BaseHandler, PandasHandler and PolarsHandler.

Similar idea: https://github.com/data-apis/dataframe-interchange-tests?tab=readme-ov-file#what-the-heck-is-libraryinfo

It also adds a new --library parameter for pytest to be able to run tests for separate implementation.

@anmyachev anmyachev force-pushed the tests-impl-agnostic branch 2 times, most recently from e9645c9 to 0b080a4 Compare April 19, 2024 17:30
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Comment on lines +33 to +35
pytest tests --cov=dataframe_api_compat/pandas_standard --cov=tests --cov-append --cov-fail-under=50 --cov-report= --library pandas-numpy
pytest tests --cov=dataframe_api_compat/pandas_standard --cov=tests --cov-append --cov-fail-under=50 --cov-report= --library pandas-nullable
pytest tests --cov=dataframe_api_compat/polars_standard --cov=tests --cov-append --cov-fail-under=100 --library polars-lazy
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more scalable way to run tests. Not all dependencies can be installed in one environment and in the future we will have to use different environments for different implementations.

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@anmyachev anmyachev marked this pull request as ready for review April 22, 2024 20:55
@anmyachev anmyachev merged commit 3d2a4f0 into data-apis:main Apr 22, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant