Skip to content

Commit 16583a5

Browse files
fixup
1 parent f1ad983 commit 16583a5

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

pandas/tests/indexes/datetimes/test_ops.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -389,27 +389,27 @@ def test_comp_nat(self):
389389
pd.Timestamp('2011-01-03')])
390390
right = pd.DatetimeIndex([pd.NaT, pd.NaT, pd.Timestamp('2011-01-03')])
391391

392-
for l, r in [(left, right),
393-
(left.astype(object), right.astype(object))]:
394-
result = r == l
392+
for lhs, rhs in [(left, right),
393+
(left.astype(object), right.astype(object))]:
394+
result = rhs == lhs
395395
expected = np.array([False, False, True])
396396
tm.assert_numpy_array_equal(result, expected)
397397

398-
result = l != r
398+
result = lhs != rhs
399399
expected = np.array([True, True, False])
400400
tm.assert_numpy_array_equal(result, expected)
401401

402402
expected = np.array([False, False, False])
403-
tm.assert_numpy_array_equal(l == pd.NaT, expected)
404-
tm.assert_numpy_array_equal(pd.NaT == r, expected)
403+
tm.assert_numpy_array_equal(lhs == pd.NaT, expected)
404+
tm.assert_numpy_array_equal(pd.NaT == rhs, expected)
405405

406406
expected = np.array([True, True, True])
407-
tm.assert_numpy_array_equal(l != pd.NaT, expected)
408-
tm.assert_numpy_array_equal(pd.NaT != l, expected)
407+
tm.assert_numpy_array_equal(lhs != pd.NaT, expected)
408+
tm.assert_numpy_array_equal(pd.NaT != lhs, expected)
409409

410410
expected = np.array([False, False, False])
411-
tm.assert_numpy_array_equal(l < pd.NaT, expected)
412-
tm.assert_numpy_array_equal(pd.NaT > l, expected)
411+
tm.assert_numpy_array_equal(lhs < pd.NaT, expected)
412+
tm.assert_numpy_array_equal(pd.NaT > lhs, expected)
413413

414414
def test_value_counts_unique(self):
415415
# GH 7735

pandas/tests/indexes/period/test_ops.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_ops_properties(self):
2727
self.check_ops_properties(PeriodIndex._object_ops, f)
2828
self.check_ops_properties(PeriodIndex._bool_ops, f)
2929

30-
def test_astype(self):
30+
def test_astype_object(self):
3131
idx = pd.period_range(start='2013-01-01', periods=4, freq='M',
3232
name='idx')
3333
expected_list = [pd.Period('2013-01-31', freq='M'),

pandas/tests/indexes/period/test_period.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def test_factorize(self):
380380
tm.assert_numpy_array_equal(arr, exp_arr)
381381
tm.assert_index_equal(idx, exp_idx)
382382

383-
def test_astype(self):
383+
def test_astype_object(self):
384384
idx = pd.PeriodIndex([], freq='M')
385385

386386
exp = np.array([], dtype=object)

pandas/tests/indexes/timedeltas/test_ops.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_ops_properties(self):
2525
self.check_ops_properties(TimedeltaIndex._field_ops, f)
2626
self.check_ops_properties(TimedeltaIndex._object_ops, f)
2727

28-
def test_astype(self):
28+
def test_astype_object(self):
2929
idx = timedelta_range(start='1 days', periods=4, freq='D', name='idx')
3030
expected_list = [Timedelta('1 days'), Timedelta('2 days'),
3131
Timedelta('3 days'), Timedelta('4 days')]
@@ -217,27 +217,27 @@ def test_comp_nat(self):
217217
pd.Timedelta('3 days')])
218218
right = pd.TimedeltaIndex([pd.NaT, pd.NaT, pd.Timedelta('3 days')])
219219

220-
for l, r in [(left, right),
221-
(left.astype(object), right.astype(object))]:
222-
result = r == l
220+
for lhs, rhs in [(left, right),
221+
(left.astype(object), right.astype(object))]:
222+
result = rhs == lhs
223223
expected = np.array([False, False, True])
224224
tm.assert_numpy_array_equal(result, expected)
225225

226-
result = r != l
226+
result = rhs != lhs
227227
expected = np.array([True, True, False])
228228
tm.assert_numpy_array_equal(result, expected)
229229

230230
expected = np.array([False, False, False])
231-
tm.assert_numpy_array_equal(l == pd.NaT, expected)
232-
tm.assert_numpy_array_equal(pd.NaT == r, expected)
231+
tm.assert_numpy_array_equal(lhs == pd.NaT, expected)
232+
tm.assert_numpy_array_equal(pd.NaT == rhs, expected)
233233

234234
expected = np.array([True, True, True])
235-
tm.assert_numpy_array_equal(l != pd.NaT, expected)
236-
tm.assert_numpy_array_equal(pd.NaT != l, expected)
235+
tm.assert_numpy_array_equal(lhs != pd.NaT, expected)
236+
tm.assert_numpy_array_equal(pd.NaT != lhs, expected)
237237

238238
expected = np.array([False, False, False])
239-
tm.assert_numpy_array_equal(l < pd.NaT, expected)
240-
tm.assert_numpy_array_equal(pd.NaT > l, expected)
239+
tm.assert_numpy_array_equal(lhs < pd.NaT, expected)
240+
tm.assert_numpy_array_equal(pd.NaT > lhs, expected)
241241

242242
def test_value_counts_unique(self):
243243
# GH 7735

0 commit comments

Comments
 (0)