diff --git a/pandas/tests/frame/constructors/test_from_records.py b/pandas/tests/frame/constructors/test_from_records.py index abb70089f1fef..4aa150afadef6 100644 --- a/pandas/tests/frame/constructors/test_from_records.py +++ b/pandas/tests/frame/constructors/test_from_records.py @@ -33,10 +33,7 @@ def test_from_records_with_datetimes(self): arrdata = [np.array([datetime(2005, 3, 1, 0, 0), None])] dtypes = [("EXPIRY", " 0) & (df_new.B < 0) ] - tm.assert_frame_equal(result, expected, check_freq=False) - # FIXME: 2020-05-07 freq check randomly fails in the CI + tm.assert_frame_equal(result, expected) # yield an empty frame result = store.select("df", "string='foo' and string2='cool'") @@ -610,9 +609,7 @@ def check_col(key, name, size): result = store.select("df_dc", ["B > 0", "C > 0", "string == foo"]) expected = df_dc[(df_dc.B > 0) & (df_dc.C > 0) & (df_dc.string == "foo")] - tm.assert_frame_equal(result, expected, check_freq=False) - # FIXME: 2020-12-07 intermittent build failures here with freq of - # None instead of BDay(4) + tm.assert_frame_equal(result, expected) with ensure_clean_store(setup_path) as store: # doc example part 2 diff --git a/pandas/tests/io/pytables/test_select.py b/pandas/tests/io/pytables/test_select.py index fc8d4506abda0..eb4c425c332ff 100644 --- a/pandas/tests/io/pytables/test_select.py +++ b/pandas/tests/io/pytables/test_select.py @@ -838,8 +838,7 @@ def test_select_as_multiple(setup_path): ) expected = concat([df1, df2], axis=1) expected = expected[(expected.A > 0) & (expected.B > 0)] - tm.assert_frame_equal(result, expected, check_freq=False) - # FIXME: 2021-01-20 this is failing with freq None vs 4B on some builds + tm.assert_frame_equal(result, expected) # multiple (diff selector) result = store.select_as_multiple( diff --git a/pandas/tests/io/pytables/test_store.py b/pandas/tests/io/pytables/test_store.py index 83c86d4da05e6..bb63902bade7b 100644 --- a/pandas/tests/io/pytables/test_store.py +++ b/pandas/tests/io/pytables/test_store.py @@ -648,9 +648,7 @@ def test_coordinates(setup_path): expected = concat([df1, df2], axis=1) expected = expected[(expected.A > 0) & (expected.B > 0)] - tm.assert_frame_equal(result, expected, check_freq=False) - # FIXME: 2021-01-18 on some (mostly windows) builds we get freq=None - # but expect freq="18B" + tm.assert_frame_equal(result, expected) # pass array/mask as the coordinates with ensure_clean_store(setup_path) as store: diff --git a/pandas/tests/plotting/test_converter.py b/pandas/tests/plotting/test_converter.py index 1d9b14a739848..940b0e8988d65 100644 --- a/pandas/tests/plotting/test_converter.py +++ b/pandas/tests/plotting/test_converter.py @@ -81,20 +81,20 @@ def test_dont_register_by_default(self): @td.skip_if_no("matplotlib", min_version="3.1.3") def test_registering_no_warning(self): plt = pytest.importorskip("matplotlib.pyplot") - s = Series(range(12), index=date_range("2017", periods=12)) + ser = Series(range(12), index=date_range("2017", periods=12)) _, ax = plt.subplots() # Set to the "warn" state, in case this isn't the first test run register_matplotlib_converters() - ax.plot(s.index, s.values) + ax.plot(ser.index, ser.values) plt.close() def test_pandas_plots_register(self): plt = pytest.importorskip("matplotlib.pyplot") - s = Series(range(12), index=date_range("2017", periods=12)) + ser = Series(range(12), index=date_range("2017", periods=12)) # Set to the "warn" state, in case this isn't the first test run with tm.assert_produces_warning(None) as w: - s.plot() + ser.plot() try: assert len(w) == 0 @@ -118,17 +118,17 @@ def test_option_no_warning(self): pytest.importorskip("matplotlib.pyplot") ctx = cf.option_context("plotting.matplotlib.register_converters", False) plt = pytest.importorskip("matplotlib.pyplot") - s = Series(range(12), index=date_range("2017", periods=12)) + ser = Series(range(12), index=date_range("2017", periods=12)) _, ax = plt.subplots() # Test without registering first, no warning with ctx: - ax.plot(s.index, s.values) + ax.plot(ser.index, ser.values) # Now test with registering register_matplotlib_converters() with ctx: - ax.plot(s.index, s.values) + ax.plot(ser.index, ser.values) plt.close() def test_registry_resets(self): diff --git a/pandas/tests/plotting/test_datetimelike.py b/pandas/tests/plotting/test_datetimelike.py index f74cab9ed04da..44113d1e217fd 100644 --- a/pandas/tests/plotting/test_datetimelike.py +++ b/pandas/tests/plotting/test_datetimelike.py @@ -179,12 +179,7 @@ def check_format_of_first_point(ax, expected_string): first_line = ax.get_lines()[0] first_x = first_line.get_xdata()[0].ordinal first_y = first_line.get_ydata()[0] - try: - assert expected_string == ax.format_coord(first_x, first_y) - except (ValueError): - pytest.skip( - "skipping test because issue forming test comparison GH7664" - ) + assert expected_string == ax.format_coord(first_x, first_y) annual = Series(1, index=date_range("2014-01-01", periods=3, freq="A-DEC")) _, ax = self.plt.subplots() diff --git a/pandas/tests/plotting/test_hist_method.py b/pandas/tests/plotting/test_hist_method.py index 403f4a2c06df1..85942839951fe 100644 --- a/pandas/tests/plotting/test_hist_method.py +++ b/pandas/tests/plotting/test_hist_method.py @@ -236,6 +236,11 @@ def test_hist_kde_color(self): @td.skip_if_no_mpl class TestDataFramePlots(TestPlotBase): + @pytest.mark.xfail( + reason="2021-12-06 ValueError: view limit minimum -36435.78943428784 is " + "less than 1 and is an invalid Matplotlib date value. This often happens " + "if you pass a non-datetime value to an axis that has datetime units" + ) def test_hist_df_legacy(self): from matplotlib.patches import Rectangle