Bug#884294: pandas FTBFS: test failure

Adrian Bunk bunk at debian.org
Wed Dec 13 12:43:15 UTC 2017


Source: pandas
Version: 0.20.3-10
Severity: serious

Some recent change in unstable makes pandas FTBFS:

https://tests.reproducible-builds.org/debian/history/pandas.html
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/pandas.html

...
=================================== FAILURES ===================================
_________________________ TestSafeSort.test_unsortable _________________________

self = <pandas.tests.test_algos.TestSafeSort object at 0x7f9b7d062b50>

    def test_unsortable(self):
        # GH 13714
        arr = np.array([1, 2, datetime.now(), 0, 3], dtype=object)
        if compat.PY2 and not pd._np_version_under1p10:
            # RuntimeWarning: tp_compare didn't return -1 or -2 for exception
            with tm.assert_produces_warning(RuntimeWarning):
>               pytest.raises(TypeError, algos.safe_sort, arr)

../debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/test_algos.py:131: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/contextlib.py:24: in __exit__
    self.gen.next()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected_warning = <type 'exceptions.RuntimeWarning'>, filter_level = 'always'
clear = None, check_stacklevel = True

    @contextmanager
    def assert_produces_warning(expected_warning=Warning, filter_level="always",
                                clear=None, check_stacklevel=True):
        """
        Context manager for running code that expects to raise (or not raise)
        warnings.  Checks that code raises the expected warning and only the
        expected warning. Pass ``False`` or ``None`` to check that it does *not*
        raise a warning. Defaults to ``exception.Warning``, baseclass of all
        Warnings. (basically a wrapper around ``warnings.catch_warnings``).
    
        >>> import warnings
        >>> with assert_produces_warning():
        ...     warnings.warn(UserWarning())
        ...
        >>> with assert_produces_warning(False):
        ...     warnings.warn(RuntimeWarning())
        ...
        Traceback (most recent call last):
            ...
        AssertionError: Caused unexpected warning(s): ['RuntimeWarning'].
        >>> with assert_produces_warning(UserWarning):
        ...     warnings.warn(RuntimeWarning())
        Traceback (most recent call last):
            ...
        AssertionError: Did not see expected warning of class 'UserWarning'.
    
        ..warn:: This is *not* thread-safe.
        """
        with warnings.catch_warnings(record=True) as w:
    
            if clear is not None:
                # make sure that we are clearning these warnings
                # if they have happened before
                # to guarantee that we will catch them
                if not is_list_like(clear):
                    clear = [clear]
                for m in clear:
                    try:
                        m.__warningregistry__.clear()
                    except:
                        pass
    
            saw_warning = False
            warnings.simplefilter(filter_level)
            yield w
            extra_warnings = []
    
            for actual_warning in w:
                if (expected_warning and issubclass(actual_warning.category,
                                                    expected_warning)):
                    saw_warning = True
    
                    if check_stacklevel and issubclass(actual_warning.category,
                                                       (FutureWarning,
                                                        DeprecationWarning)):
                        from inspect import getframeinfo, stack
                        caller = getframeinfo(stack()[2][0])
                        msg = ("Warning not set with correct stacklevel. "
                               "File where warning is raised: {0} != {1}. "
                               "Warning message: {2}".format(
                                   actual_warning.filename, caller.filename,
                                   actual_warning.message))
                        assert actual_warning.filename == caller.filename, msg
                else:
                    extra_warnings.append(actual_warning.category.__name__)
            if expected_warning:
                assert saw_warning, ("Did not see expected warning of class %r."
>                                    % expected_warning.__name__)
E               AssertionError: Did not see expected warning of class 'RuntimeWarning'.

../debian/tmp/usr/lib/python2.7/dist-packages/pandas/util/testing.py:2655: AssertionError
=============================== warnings summary ===============================
debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/dtypes/test_missing.py::test_array_equivalent_compat
  /usr/lib/python2.7/dist-packages/numpy/core/numeric.py:2604: FutureWarning: elementwise == comparison failed and returning scalar instead; this will raise an error or perform elementwise comparison in the future.
    return bool(asarray(a1 == a2).all())

debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/frame/test_analytics.py::TestDataFrameAnalytics::()::test_corr_int_and_boolean
  /usr/lib/python2.7/dist-packages/scipy/stats/stats.py:3577: RuntimeWarning: invalid value encountered in double_scalars
    size * (size - 1) * (size - 2))

debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_frame.py::TestDataFramePlots::()::test_line_colors
  /build/1st/pandas-0.20.3/debian/tmp/usr/lib/python2.7/dist-packages/pandas/plotting/_core.py:179: UserWarning: 'colors' is being deprecated. Please use 'color'instead of 'colors'
    warnings.warn(("'colors' is being deprecated. Please use 'color'"

debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_misc.py::TestDataFramePlots::()::test_parallel_coordinates_with_sorted_labels
  /usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py:2903: UserWarning: Attempting to set identical left==right results
  in singular transformations; automatically expanding.
  left=0, right=0
    'left=%s, right=%s') % (left, right))
  /usr/lib/python2.7/dist-packages/_pytest/warnings.py:88: UnicodeWarning: Warning is using unicode non convertible to ascii, converting to a safe representation:
    /usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py:2903: UserWarning: Attempting to set identical left==right results
  in singular transformations; automatically expanding.
  left=0, right=0
    'left=%s, right=%s') % (left, right))
  
    UnicodeWarning)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
============================= 539 tests deselected =============================
 1 failed, 9841 passed, 141 skipped, 539 deselected, 10 xfailed, 5 warnings in 2605.19 seconds 
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":99"
      after 11 requests (8 known processed) with 0 events remaining.
debian/rules:112: recipe for target 'python-test2.7' failed
make[1]: *** [python-test2.7] Error 1



More information about the debian-science-maintainers mailing list