Skip to content

BUG: pd.test() fails on Python v3.9.6 #46498

@SomervilleTom

Description

@SomervilleTom

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

>>> import pandas as pd
>>> pd.test()

Issue Description

>>> import pandas as pd
>>> pd.test()
running: pytest --skip-slow --skip-network --skip-db /home/tms/.local/lib/python3.9/site-packages/pandas
======================================== test session starts =========================================
platform linux -- Python 3.9.6, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/tms
plugins: hypothesis-6.39.4
collected 156958 items / 37 skipped                                                                  
# ...
= 3 failed, 146978 passed, 8670 skipped, 1318 xfailed, 3 xpassed, 169 warnings, 23 errors in 997.19s (0:16:37) =

Note the several failures, warnings and errors as well as the extended (997.19s) time.

Expected Behavior

I'm a reasonably proficient Python developer attempting to evaluate whether pandas can solve a specific data imputation issue that has come up in a project. I'm therefore new to pandas, while not new to Python or the rest of my toolchain.

Surely a stable distribution of any package should pass its own documented tests! I see so many failures that I'm left doubting whether pandas is running at all. Since I am new to pandas, I have no way of knowing which if any of these failures, errors, and warnings are significant and which are not.

I have installed Pandas using pip3 on a Rocky Linux v8.5 (CentOS 8) system running python 3.9. I did the installation using pip3 and following the instructions in the pandas documentation.

I expect any standard "stable" version to pass most of its published tests. In the pandas documentation, the expected results are:

running: pytest --skip-slow --skip-network C:\Users\TP\Anaconda3\envs\py36\lib\site-packages\pandas
============================= test session starts =============================
platform win32 -- Python 3.6.2, pytest-3.6.0, py-1.4.34, pluggy-0.4.0
rootdir: C:\Users\TP\Documents\Python\pandasdev\pandas, inifile: setup.cfg
collected 12145 items / 3 skipped

..................................................................S......
........S................................................................
.........................................................................

==================== 12130 passed, 12 skipped in 368.339 seconds =====================

Significantly, I expect to have 0 failures, and 0 errors. I'm not sure about "xfailed", "xpassed", and "warnings".

I have tried using pip3 to install various combinations of the 30+ dependencies mentioned in the documentation. Seven of those cause pip3 to fail, and so I skipped them.

SQLAlchemy
psycopg2
PyTables
zlib
PyQt4
xclip
xsel

By the time I installed all of the installable dependencies, the test results worsened:

= 4 failed, 148951 passed, 7431 skipped, 1330 xfailed, 3 xpassed, 184 warnings, 48 errors in 1081.06s (0:18:01) =

Installed Versions

INSTALLED VERSIONS ------------------ commit : 06d2301 python : 3.9.6.final.0 python-bits : 64 OS : Linux OS-release : 4.18.0-348.12.2.el8_5.x86_64 Version : #1 SMP Wed Jan 19 17:53:40 UTC 2022 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8

pandas : 1.4.1
numpy : 1.22.3
pytz : 2021.3
dateutil : 2.8.2
pip : 20.2.4
setuptools : 50.3.2
Cython : None
pytest : 7.1.1
hypothesis : 6.39.4
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : 1.3.4
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : 2.8.1
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 7.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.8.0
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCIContinuous IntegrationIO NetworkLocal or Cloud (AWS, GCS, etc.) IO IssuesTestingpandas testing functions or related to the test suiteUnreliable TestUnit tests that occasionally fail

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions