How to Run Pandas' Test Suite
First place I looked to start with was Pandas’ official docs:
If only it was that easy 😊
The List of Steps
I own a Mac, but steps are probably pretty similar for the other major OSes.
Here’s the list of steps I took:
- Fork & clone the Pandas Github repo
- Obtain pyenv, pyenv-virtualenv
- Download and install Python v3.5.6 (in my case I had to re-install Xcode & specify some additional build flags to get this working):
pyenv install 3.5.6
- Create a new Python virtual environment and activate it:
pyenv virtualenv pandasdev && pyenv activate pandasdev
- Specify the Pyhton version to be used for subsequent commands:
pyenv version 3.5.6
- Install Cython (for whatever reason this is not a stated dependency and the next step will fail if you do not perform this one):
pip install cython
- Install an “editable” version of pandas, along with its “test” dependencies:
pip install -e ".[test]"
- Finally, use
py.test
to run the tests!
pytest ./pandas/
So how did it turn out?
Ultimately, on my iMac it took ~1400 seconds (24 minutes) to run the test suite:
=============== 15 failed, 52313 passed, 3609 skipped, 826 xfailed, 15 xpassed, 3 warnings in 1428.99 seconds ================
Not perfect results from the head of master
branch…suspicious!
Many (all?) of the test failures seemed to be due to logged warning messages of the type:
AssertionError: Did not see expected warning of class 'FutureWarning'.
What to do next?
I’ll do some more digging later to identify what might be causing them to be categorized as failures, but this looks like a good place to start:
https://dev.pandas.io/development/contributing.html#testing-warnings