Source: pandas Version: 0.20.3-11 Severity: serious https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/pandas.html
... =================================== FAILURES =================================== ____________________ TestDataFramePlots.test_boxplot_legacy ____________________ self = <pandas.tests.plotting.test_boxplot_method.TestDataFramePlots object at 0x7f42c05d61d0> @slow def test_boxplot_legacy(self): df = DataFrame(randn(6, 4), index=list(string.ascii_letters[:6]), columns=['one', 'two', 'three', 'four']) df['indic'] = ['foo', 'bar'] * 3 df['indic2'] = ['foo', 'bar', 'foo'] * 2 _check_plot_works(df.boxplot, return_type='dict') _check_plot_works(df.boxplot, column=[ 'one', 'two'], return_type='dict') # _check_plot_works adds an ax so catch warning. see GH #13188 with tm.assert_produces_warning(UserWarning): _check_plot_works(df.boxplot, column=['one', 'two'], by='indic') _check_plot_works(df.boxplot, column='one', by=['indic', 'indic2']) with tm.assert_produces_warning(UserWarning): _check_plot_works(df.boxplot, by='indic') with tm.assert_produces_warning(UserWarning): > _check_plot_works(df.boxplot, by=['indic', 'indic2']) ../debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_boxplot_method.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python2.7/contextlib.py:24: in __exit__ self.gen.next() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ expected_warning = <type 'exceptions.UserWarning'>, 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__) assert not extra_warnings, ("Caused unexpected warning(s): %r." > % extra_warnings) E AssertionError: Caused unexpected warning(s): ['FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning', 'FutureWarning']. ../debian/tmp/usr/lib/python2.7/dist-packages/pandas/util/testing.py:2657: AssertionError _______________ TestSeriesAnalytics.test_reshape_2d_return_array _______________ self = <pandas.tests.series.test_analytics.TestSeriesAnalytics object at 0x7f42e58fcfd0> def test_reshape_2d_return_array(self): x = Series(np.random.random(201), name='x') with tm.assert_produces_warning(FutureWarning): result = x.reshape((-1, 1)) assert not isinstance(result, Series) with tm.assert_produces_warning(FutureWarning, check_stacklevel=False): result2 = np.reshape(x, (-1, 1)) > assert not isinstance(result2, Series) ../debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/series/test_analytics.py:1496: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python2.7/contextlib.py:24: in __exit__ self.gen.next() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ expected_warning = <type 'exceptions.FutureWarning'>, filter_level = 'always' clear = None, check_stacklevel = False @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 'FutureWarning'. ../debian/tmp/usr/lib/python2.7/dist-packages/pandas/util/testing.py:2655: AssertionError ____________________ TestSeriesAnalytics.test_numpy_reshape ____________________ self = <pandas.tests.series.test_analytics.TestSeriesAnalytics object at 0x7f42384dee10> def test_numpy_reshape(self): a = Series([1, 2, 3, 4]) with tm.assert_produces_warning(FutureWarning, check_stacklevel=False): result = np.reshape(a, (2, 2)) expected = a.values.reshape(2, 2) tm.assert_numpy_array_equal(result, expected) > assert isinstance(result, type(expected)) ../debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/series/test_analytics.py:1523: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python2.7/contextlib.py:24: in __exit__ self.gen.next() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ expected_warning = <type 'exceptions.FutureWarning'>, filter_level = 'always' clear = None, check_stacklevel = False @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 'FutureWarning'. ../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_boxplot_method.py::TestDataFramePlots::()::test_boxplot_legacy /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead return getattr(obj, method)(*args, **kwds) /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead return getattr(obj, method)(*args, **kwds) /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead return getattr(obj, method)(*args, **kwds) /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead return getattr(obj, method)(*args, **kwds) /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead return getattr(obj, method)(*args, **kwds) /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead return getattr(obj, method)(*args, **kwds) /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead return getattr(obj, method)(*args, **kwds) /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead return getattr(obj, method)(*args, **kwds) debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_boxplot_method.py::TestDataFramePlots::()::test_boxplot_axis_limits /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:57: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead return getattr(obj, method)(*args, **kwds) debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_datetimelike.py::TestTSPlot::()::test_irreg_hf /usr/lib/python2.7/dist-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance. warnings.warn(message, mplDeprecation, stacklevel=1) /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/cbook/deprecation.py:106: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance. warnings.warn(message, mplDeprecation, stacklevel=1) UnicodeWarning) debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_frame.py::TestDataFramePlots::()::test_logscales /usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py:2966: UserWarning: Attempted to set non-positive xlimits for log-scale axis; invalid limits will be ignored. 'Attempted to set non-positive xlimits for log-scale axis; ' /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:2966: UserWarning: Attempted to set non-positive xlimits for log-scale axis; invalid limits will be ignored. 'Attempted to set non-positive xlimits for log-scale axis; ' UnicodeWarning) debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_frame.py::TestDataFramePlots::()::test_plain_axes /usr/lib/python2.7/dist-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead. warnings.warn(message, mplDeprecation, stacklevel=1) /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/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead. warnings.warn(message, mplDeprecation, stacklevel=1) UnicodeWarning) 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_hist_method.py::TestDataFramePlots::()::test_tight_layout /build/1st/pandas-0.20.3/debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_hist_method.py:249: UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared _check_plot_works(df.hist) debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_misc.py::TestSeriesPlots::()::test_autocorrelation_plot /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /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/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) UnicodeWarning) debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_misc.py::TestDataFramePlots::()::test_andrews_curves /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) 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:2961: 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:2961: UserWarning: Attempting to set identical left==right results in singular transformations; automatically expanding. left=0, right=0 'left=%s, right=%s') % (left, right)) UnicodeWarning) debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/plotting/test_misc.py::TestDataFramePlots::()::test_radviz /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) /usr/lib/python2.7/dist-packages/matplotlib/pyplot.py:962: UserWarning: Requested projection is different from current axis projection, creating new axis with requested projection. return gcf().gca(**kwargs) -- Docs: http://doc.pytest.org/en/latest/warnings.html ============================= 539 tests deselected ============================= 3 failed, 9839 passed, 141 skipped, 539 deselected, 10 xfailed, 36 warnings in 3603.15 seconds debian/rules:112: recipe for target 'python-test2.7' failed make[1]: *** [python-test2.7] Error 1