Skip to content

Commit 35f83e6

Browse files
committed
Update test suite.
1 parent 3726a49 commit 35f83e6

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

pandas/tests/io/test_pytables.py

+18-15
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ def test_repr(self):
387387

388388
with ensure_clean_store(self.path) as store:
389389
repr(store)
390+
store.info()
390391
store['a'] = tm.makeTimeSeries()
391392
store['b'] = tm.makeStringSeries()
392393
store['c'] = tm.makeDataFrame()
@@ -420,6 +421,7 @@ def test_repr(self):
420421

421422
repr(store)
422423
str(store)
424+
store.info()
423425

424426
# storers
425427
with ensure_clean_store(self.path) as store:
@@ -4371,11 +4373,11 @@ def test_multiple_open_close(self):
43714373

43724374
# single
43734375
store = HDFStore(path)
4374-
assert 'CLOSED' not in str(store)
4376+
assert 'CLOSED' not in store.info()
43754377
assert store.is_open
43764378

43774379
store.close()
4378-
assert 'CLOSED' in str(store)
4380+
assert 'CLOSED' in store.info()
43794381
assert not store.is_open
43804382

43814383
with ensure_clean_path(self.path) as path:
@@ -4396,20 +4398,20 @@ def f():
43964398
store1 = HDFStore(path)
43974399
store2 = HDFStore(path)
43984400

4399-
assert 'CLOSED' not in str(store1)
4400-
assert 'CLOSED' not in str(store2)
4401+
assert 'CLOSED' not in store1.info()
4402+
assert 'CLOSED' not in store2.info()
44014403
assert store1.is_open
44024404
assert store2.is_open
44034405

44044406
store1.close()
4405-
assert 'CLOSED' in str(store1)
4407+
assert 'CLOSED' in store1.info()
44064408
assert not store1.is_open
4407-
assert 'CLOSED' not in str(store2)
4409+
assert 'CLOSED' not in store2.info()
44084410
assert store2.is_open
44094411

44104412
store2.close()
4411-
assert 'CLOSED' in str(store1)
4412-
assert 'CLOSED' in str(store2)
4413+
assert 'CLOSED' in store1.info()
4414+
assert 'CLOSED' in store2.info()
44134415
assert not store1.is_open
44144416
assert not store2.is_open
44154417

@@ -4420,11 +4422,11 @@ def f():
44204422
store2 = HDFStore(path)
44214423
store2.append('df2', df)
44224424
store2.close()
4423-
assert 'CLOSED' in str(store2)
4425+
assert 'CLOSED' in store2.info()
44244426
assert not store2.is_open
44254427

44264428
store.close()
4427-
assert 'CLOSED' in str(store)
4429+
assert 'CLOSED' in store.info()
44284430
assert not store.is_open
44294431

44304432
# double closing
@@ -4433,11 +4435,11 @@ def f():
44334435

44344436
store2 = HDFStore(path)
44354437
store.close()
4436-
assert 'CLOSED' in str(store)
4438+
assert 'CLOSED' in store.info()
44374439
assert not store.is_open
44384440

44394441
store2.close()
4440-
assert 'CLOSED' in str(store2)
4442+
assert 'CLOSED' in store2.info()
44414443
assert not store2.is_open
44424444

44434445
# ops on a closed store
@@ -4784,9 +4786,10 @@ def test_categorical(self):
47844786
tm.assert_frame_equal(result, df2)
47854787

47864788
# Make sure the metadata is OK
4787-
assert '/df2 ' in str(store)
4788-
assert '/df2/meta/values_block_0/meta' in str(store)
4789-
assert '/df2/meta/values_block_1/meta' in str(store)
4789+
info = store.info()
4790+
assert '/df2 ' in info
4791+
assert '/df2/meta/values_block_0/meta' in info
4792+
assert '/df2/meta/values_block_1/meta' in info
47904793

47914794
# unordered
47924795
s = Series(Categorical(['a', 'b', 'b', 'a', 'a', 'c'], categories=[

0 commit comments

Comments
 (0)