Skip to content

Commit 6633145

Browse files
committed
TST: use pandas testing tools
1 parent e38fae8 commit 6633145

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/io/pytables/test_store.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -4902,13 +4902,13 @@ def _constructor(self):
49024902
with ensure_clean_path("temp.h5") as path:
49034903
sdf.to_hdf(path, "df")
49044904
result = read_hdf(path, "df").values
4905-
assert np.array_equal(result, expected)
4905+
tm.assert_numpy_array_equal(result, expected)
49064906

49074907
with ensure_clean_path("temp.h5") as path:
49084908
with HDFStore(path) as store:
49094909
store.put("df", sdf)
49104910
result = read_hdf(path, "df").values
4911-
assert np.array_equal(result, expected)
4911+
tm.assert_numpy_array_equal(result, expected)
49124912

49134913
def test_supported_for_subclasses_series(self):
49144914
class SubSeries(Series):
@@ -4922,12 +4922,14 @@ def _constructor(self):
49224922

49234923
with ensure_clean_path("temp.h5") as path:
49244924
sser.to_hdf(path, "ser")
4925+
result = read_hdf(path, "ser").values
4926+
tm.assert_numpy_array_equal(result, expected)
49254927

49264928
with ensure_clean_path("temp.h5") as path:
49274929
with HDFStore(path) as store:
49284930
store.put("ser", sser)
49294931
result = read_hdf(path, "ser").values
4930-
assert np.array_equal(result, expected)
4932+
tm.assert_numpy_array_equal(result, expected)
49314933

49324934

49334935
@pytest.mark.parametrize("bad_version", [(1, 2), (1,), [], "12", "123"])

0 commit comments

Comments
 (0)