From c4dab88c29b72a4efb3a4cee7df210cdf9555361 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Tue, 13 Feb 2018 08:56:33 -0600 Subject: [PATCH] Test cleanpu --- pandas/core/internals.py | 2 +- pandas/tests/extension/base.py | 7 +--- pandas/tests/extension/test_categorical.py | 1 - pandas/tests/extension/test_json.py | 40 ---------------------- 4 files changed, 2 insertions(+), 48 deletions(-) diff --git a/pandas/core/internals.py b/pandas/core/internals.py index fffbe18d3008c..e48c4202a7da8 100644 --- a/pandas/core/internals.py +++ b/pandas/core/internals.py @@ -3473,7 +3473,7 @@ def apply(self, f, axes=None, filter=None, do_integrity_check=False, else: align_keys = [] - # TODO: may interfere with ExtensionBlock.setitem for blocks + # TODO(EA): may interfere with ExtensionBlock.setitem for blocks # with a .values attribute. aligned_args = dict((k, kwargs[k]) for k in align_keys diff --git a/pandas/tests/extension/base.py b/pandas/tests/extension/base.py index dc9bca653e6f3..51d9da1fe8bab 100644 --- a/pandas/tests/extension/base.py +++ b/pandas/tests/extension/base.py @@ -398,17 +398,12 @@ def test_isna(self, data_missing): expected = pd.Series(expected) tm.assert_series_equal(result, expected) - def test_dropna(self, data_missing): - result = pd.Series(data_missing).dropna() - expected = pd.Series(data_missing).iloc[[1]] - tm.assert_series_equal(result, expected) - def test_align(self, data): a = data[:3] b = data[2:5] r1, r2 = pd.Series(a).align(pd.Series(b, index=[1, 2, 3])) - # TODO: assumes that the ctor can take a list of scalars of the type + # Assumes that the ctor can take a list of scalars of the type e1 = pd.Series(type(data)(list(a) + [data._fill_value])) e2 = pd.Series(type(data)([data._fill_value] + list(b))) tm.assert_series_equal(r1, e1) diff --git a/pandas/tests/extension/test_categorical.py b/pandas/tests/extension/test_categorical.py index 237963bc38415..402c53706294b 100644 --- a/pandas/tests/extension/test_categorical.py +++ b/pandas/tests/extension/test_categorical.py @@ -50,7 +50,6 @@ def test_align(self, data): b = data[2:5] r1, r2 = pd.Series(a).align(pd.Series(b, index=[1, 2, 3])) - # TODO: assumes that the ctor can take a list of scalars of the type e1 = pd.Series(type(data)(list(a) + [data._fill_value], dtype=data.dtype)) e2 = pd.Series(type(data)([data._fill_value] + list(b), diff --git a/pandas/tests/extension/test_json.py b/pandas/tests/extension/test_json.py index 515272a4850f9..6d2d227a709fe 100644 --- a/pandas/tests/extension/test_json.py +++ b/pandas/tests/extension/test_json.py @@ -133,43 +133,3 @@ def na_cmp(self): @pytest.mark.skip(reason="Unhashable") def test_value_counts(self, all_data, dropna): pass - - # @pytest.mark.xfail(reason="Difficulty setting sized objects.") - # def test_set_scalar(self): - # pass - # - - @pytest.mark.xfail(reason="Difficulty setting sized objects.") - def test_set_loc_scalar_mixed(self): - # This fails on an np.ndarary(dict) call in _setitem_with_indexer - pass - - # @pytest.mark.xfail(reason="Difficulty setting sized objects.") - # def test_set_loc_scalar_single(self): - # pass - # - - @pytest.mark.xfail(reason="Difficulty setting sized objects.") - def test_set_loc_scalar_multiple_homogoneous(self): - # This fails in _setitem_with_indexer with a - # ValueError: Must have equal len keys and value when setting with - # and iterable - pass - - @pytest.mark.xfail(reason="Difficulty setting sized objects.") - def test_set_iloc_scalar_mixed(self): - # This fails in _setitem_with_indexer with a - # ValueError: Must have equal len keys and value when setting with an - # iterable - pass - - # @pytest.mark.xfail(reason="Difficulty setting sized objects.") - # def test_set_iloc_scalar_single(self): - # pass - # - @pytest.mark.xfail(reason="Difficulty setting sized objects.") - def test_set_iloc_scalar_multiple_homogoneous(self): - # this fails in _setitem_with_indexer with a - # ValueError: Must have equal len keys and value when setting with an - # iterable - pass