Skip to content

Commit b5e0682

Browse files
committed
Reverted 4 test failures from autopep8 commit:
66fc98f Arising from correcting PEP8 E712, changing == boolean to is boolean. Possible that these are bugs in the tests?
1 parent 66fc98f commit b5e0682

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

pandas/io/tests/test_pytables.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ def test_unique(self):
14821482
df = tm.makeTimeDataFrame()
14831483

14841484
def check(x, y):
1485-
self.assert_((np.unique(x) == np.unique(y)).all() is True)
1485+
self.assert_((np.unique(x) == np.unique(y)).all() == True)
14861486

14871487
self.store.remove('df')
14881488
self.store.append('df', df)
@@ -1521,21 +1521,21 @@ def test_coordinates(self):
15211521

15221522
# all
15231523
c = self.store.select_as_coordinates('df')
1524-
assert((c.values == np.arange(len(df.index))).all() is True)
1524+
assert((c.values == np.arange(len(df.index))).all() == True)
15251525

15261526
# get coordinates back & test vs frame
15271527
self.store.remove('df')
15281528

15291529
df = DataFrame(dict(A=range(5), B=range(5)))
15301530
self.store.append('df', df)
15311531
c = self.store.select_as_coordinates('df', ['index<3'])
1532-
assert((c.values == np.arange(3)).all() is True)
1532+
assert((c.values == np.arange(3)).all() == True)
15331533
result = self.store.select('df', where=c)
15341534
expected = df.ix[0:2, :]
15351535
tm.assert_frame_equal(result, expected)
15361536

15371537
c = self.store.select_as_coordinates('df', ['index>=3', 'index<=4'])
1538-
assert((c.values == np.arange(2) + 3).all() is True)
1538+
assert((c.values == np.arange(2) + 3).all() == True)
15391539
result = self.store.select('df', where=c)
15401540
expected = df.ix[3:4, :]
15411541
tm.assert_frame_equal(result, expected)

pandas/tests/test_frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ def test_setitem_single_column_mixed_datetime(self):
10961096

10971097
# allow this syntax
10981098
df.ix['d', :] = nan
1099-
self.assert_(com.isnull(df.ix['c', :]).all() is False)
1099+
self.assert_(com.isnull(df.ix['c', :]).all() == False)
11001100

11011101
# try to set with a list like item
11021102
self.assertRaises(

pandas/tests/test_series.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,20 +360,20 @@ def test_constructor_dtype_datetime64(self):
360360
import pandas.tslib as tslib
361361

362362
s = Series(tslib.iNaT, dtype='M8[ns]', index=range(5))
363-
self.assert_(isnull(s).all() is True)
363+
self.assert_(isnull(s).all() == True)
364364

365365
s = Series(tslib.NaT, dtype='M8[ns]', index=range(5))
366-
self.assert_(isnull(s).all() is True)
366+
self.assert_(isnull(s).all() == True)
367367

368368
s = Series(nan, dtype='M8[ns]', index=range(5))
369-
self.assert_(isnull(s).all() is True)
369+
self.assert_(isnull(s).all() == True)
370370

371371
s = Series([datetime(2001, 1, 2, 0, 0), tslib.iNaT], dtype='M8[ns]')
372-
self.assert_(isnull(s[1]) is True)
372+
self.assert_(isnull(s[1]) == True)
373373
self.assert_(s.dtype == 'M8[ns]')
374374

375375
s = Series([datetime(2001, 1, 2, 0, 0), nan], dtype='M8[ns]')
376-
self.assert_(isnull(s[1]) is True)
376+
self.assert_(isnull(s[1]) == True)
377377
self.assert_(s.dtype == 'M8[ns]')
378378

379379
def test_constructor_dict(self):

0 commit comments

Comments
 (0)