[Debian-med-packaging] Bug#950931: q2templates: FTBFS with pandas 1.0: test failures
Rebecca N. Palmer
rebecca_palmer at zoho.com
Sat Feb 8 14:15:35 GMT 2020
Source: q2templates
Version: 2019.10.0+dfsg-1
Control: block 950430 by -1
With pandas 1.0 from experimental:
============================= test session starts
==============================
platform linux -- Python 3.7.6, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
rootdir: /build/q2templates-2019.10.0+dfsg
collected 0 items
========================= no tests ran in 0.00 seconds
=========================
============================= test session starts
==============================
platform linux -- Python 3.7.6, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
rootdir: /build/q2templates-2019.10.0+dfsg
collected 3 items
q2templates/tests/test_util.py FFF
[100%]
=================================== FAILURES
===================================
______________________ TestDataFrameToHTML.test_defaults
_______________________
self = <q2templates.tests.test_util.TestDataFrameToHTML
testMethod=test_defaults>
def test_defaults(self):
df = pd.DataFrame({'col1': ['foo', 'bar', 'baz'], 'col2': [1,
2, 4.2]})
> obs = df_to_html(df)
q2templates/tests/test_util.py:31:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
q2templates/util.py:45: in df_to_html
with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
_set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
value = -1
def is_nonnegative_int(value):
"""
Verify that value is None or a positive int.
Parameters
----------
value : None or int
The `value` to be checked.
Raises
------
ValueError
When the value is not None or is a negative integer
"""
if value is None:
return
elif isinstance(value, int):
if value >= 0:
return
msg = "Value must be a nonnegative integer or None"
> raise ValueError(msg)
E ValueError: Value must be a nonnegative integer or None
/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
__________________ TestDataFrameToHTML.test_defaults_override
__________________
self = <q2templates.tests.test_util.TestDataFrameToHTML
testMethod=test_defaults_override>
def test_defaults_override(self):
df = pd.DataFrame({'col1': ['foo', 'bar', 'baz'], 'col2': [1,
2, 4.2]},
index=['id1', 'id2', 'id3'])
obs = df_to_html(df, border=1, classes=('class1', 'class2'),
> index=False)
q2templates/tests/test_util.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
q2templates/util.py:45: in df_to_html
with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
_set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
value = -1
def is_nonnegative_int(value):
"""
Verify that value is None or a positive int.
Parameters
----------
value : None or int
The `value` to be checked.
Raises
------
ValueError
When the value is not None or is a negative integer
"""
if value is None:
return
elif isinstance(value, int):
if value >= 0:
return
msg = "Value must be a nonnegative integer or None"
> raise ValueError(msg)
E ValueError: Value must be a nonnegative integer or None
/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
____________________ TestDataFrameToHTML.test_no_truncation
____________________
self = <q2templates.tests.test_util.TestDataFrameToHTML
testMethod=test_no_truncation>
def test_no_truncation(self):
long_cell = 'baz' * 100
df = pd.DataFrame({'col': ['foo', 'bar', long_cell]})
> obs = df_to_html(df)
q2templates/tests/test_util.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
q2templates/util.py:45: in df_to_html
with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
_set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
value = -1
def is_nonnegative_int(value):
"""
Verify that value is None or a positive int.
Parameters
----------
value : None or int
The `value` to be checked.
Raises
------
ValueError
When the value is not None or is a negative integer
"""
if value is None:
return
elif isinstance(value, int):
if value >= 0:
return
msg = "Value must be a nonnegative integer or None"
> raise ValueError(msg)
E ValueError: Value must be a nonnegative integer or None
/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
More information about the Debian-med-packaging
mailing list