Skip to content

Commit 487e293

Browse files
committed
remove uncovered tests after dropping python 3.7
1 parent b4db700 commit 487e293

File tree

3 files changed

+2
-29
lines changed

3 files changed

+2
-29
lines changed

db_dtypes/pandas_backports.py

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ def import_default(module_name, force=False, default=None):
6363
return default
6464

6565
name = default.__name__
66-
try:
67-
module = __import__(module_name, {}, {}, [name])
68-
except ModuleNotFoundError:
69-
return default
66+
module = __import__(module_name, {}, {}, [name])
7067

7168
return getattr(module, name, default)
7269

@@ -80,26 +77,6 @@ class OpsMixin:
8077
def _cmp_method(self, other, op): # pragma: NO COVER
8178
return NotImplemented
8279

83-
def __eq__(self, other):
84-
return self._cmp_method(other, operator.eq)
85-
86-
def __ne__(self, other):
87-
return self._cmp_method(other, operator.ne)
88-
89-
def __lt__(self, other):
90-
return self._cmp_method(other, operator.lt)
91-
92-
def __le__(self, other):
93-
return self._cmp_method(other, operator.le)
94-
95-
def __gt__(self, other):
96-
return self._cmp_method(other, operator.gt)
97-
98-
def __ge__(self, other):
99-
return self._cmp_method(other, operator.ge)
100-
101-
__add__ = __radd__ = __sub__ = lambda self, other: NotImplemented
102-
10380

10481
# TODO: use public API once pandas 1.5 / 2.x is released.
10582
# See: https://github.com/pandas-dev/pandas/pull/45544

tests/unit/test_date.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@
4848
float("nan"),
4949
]
5050

51-
if hasattr(pandas, "NA"):
52-
NULL_VALUE_TEST_CASES.append(pandas.NA)
53-
5451

5552
def test_box_func():
5653
input_array = db_dtypes.DateArray([])

tests/unit/test_dtypes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,7 @@ def test_date_add():
584584
do = pd.DateOffset(days=1)
585585
expect = dates.astype("object") + do
586586
np.testing.assert_array_equal(dates + do, expect)
587-
if pandas_release >= (1, 1):
588-
np.testing.assert_array_equal(do + dates, expect)
587+
np.testing.assert_array_equal(do + dates, expect)
589588

590589
with pytest.raises(TypeError):
591590
dates + times.astype("timedelta64")

0 commit comments

Comments
 (0)