You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple docstring tests are failing because of pretty whitespace formatting of the expected output. Here is an example from read_json() in pandas/io/json/_json.py:500
datapythonista
changed the title
multiple doctests failing where expected output contains whitespace formatting
DOC: Validation errors on doctests with output too long for a single line
Jul 9, 2019
Seehttps://stackoverflow.com/questions/17640416/doctest-normalize-whitespace-does-not-work. It does appear that to_json returns an str without any whitespace between the commas and this is why NORMALIZE_WHITESPACE doesn't work. A few ideas off the top of my head are wrapping the calls in pprint or adding a feature to to_json to allow for pretty output.
If y'all have any ideas as to how to fix this, I would be willing to take a crack at 'em.
RE: PR #27280
Multiple docstring tests are failing because of pretty whitespace formatting of the expected output. Here is an example from
read_json()
inpandas/io/json/_json.py:500
Running the validation script results in the following error:
There is another similarly failing example in this function's doctests.
Series.to_json
has similar failures as well.The
+NORMALIZE_WHITESPACE
directive does not help and neither do ellipses. Removing the whitespace does cure the failures, but it looks nasty.pandas : 0.25.0rc0+23.gc64c9cb44
numpy : 1.16.4
pytz : 2019.1
dateutil : 2.8.0
pip : 19.1.1
setuptools : 41.0.1
Cython : 0.29.11
pytest : 5.0.0
hypothesis : 4.23.6
sphinx : 1.8.5
blosc : None
feather : None
xlsxwriter : 1.1.8
lxml.etree : 4.3.4
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.10.1
IPython : 7.6.0
pandas_datareader: None
bs4 : 4.7.1
bottleneck : 1.2.1
fastparquet : 0.3.0
gcsfs : None
lxml.etree : 4.3.4
matplotlib : 3.1.0
numexpr : 2.6.9
odfpy : None
openpyxl : 2.6.2
pandas_gbq : None
pyarrow : 0.11.1
pytables : None
s3fs : 0.2.1
scipy : 1.2.1
sqlalchemy : 1.3.5
tables : 3.5.2
xarray : 0.12.1
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.1.8
The text was updated successfully, but these errors were encountered: