Skip to content

Commit cfdd437

Browse files
committed
convert test_store back to class to make git diff easier for review
1 parent 8f540a7 commit cfdd437

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

pandas/tests/io/pytables/test_complex.py

+9
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
# GH10447
3636

37+
3738
def test_complex_fixed(setup_path):
3839
df = DataFrame(
3940
np.random.rand(4, 5).astype(np.complex64),
@@ -56,6 +57,7 @@ def test_complex_fixed(setup_path):
5657
reread = read_hdf(path, "df")
5758
assert_frame_equal(df, reread)
5859

60+
5961
def test_complex_table(setup_path):
6062
df = DataFrame(
6163
np.random.rand(4, 5).astype(np.complex64),
@@ -79,6 +81,7 @@ def test_complex_table(setup_path):
7981
reread = read_hdf(path, "df")
8082
assert_frame_equal(df, reread)
8183

84+
8285
@xfail_non_writeable
8386
def test_complex_mixed_fixed(setup_path):
8487
complex64 = np.array(
@@ -102,6 +105,7 @@ def test_complex_mixed_fixed(setup_path):
102105
reread = read_hdf(path, "df")
103106
assert_frame_equal(df, reread)
104107

108+
105109
def test_complex_mixed_table(setup_path):
106110
complex64 = np.array(
107111
[1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j], dtype=np.complex64
@@ -130,6 +134,7 @@ def test_complex_mixed_table(setup_path):
130134
reread = read_hdf(path, "df")
131135
assert_frame_equal(df, reread)
132136

137+
133138
def test_complex_across_dimensions_fixed(setup_path):
134139
with catch_warnings(record=True):
135140
complex128 = np.array([1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j])
@@ -144,6 +149,7 @@ def test_complex_across_dimensions_fixed(setup_path):
144149
reread = read_hdf(path, "obj")
145150
comp(obj, reread)
146151

152+
147153
def test_complex_across_dimensions(setup_path):
148154
complex128 = np.array([1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j])
149155
s = Series(complex128, index=list("abcd"))
@@ -159,6 +165,7 @@ def test_complex_across_dimensions(setup_path):
159165
reread = read_hdf(path, "obj")
160166
comp(obj, reread)
161167

168+
162169
def test_complex_indexing_error(setup_path):
163170
complex128 = np.array(
164171
[1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j], dtype=np.complex128
@@ -171,6 +178,7 @@ def test_complex_indexing_error(setup_path):
171178
with pytest.raises(TypeError):
172179
store.append("df", df, data_columns=["C"])
173180

181+
174182
def test_complex_series_error(setup_path):
175183
complex128 = np.array([1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j])
176184
s = Series(complex128, index=list("abcd"))
@@ -184,6 +192,7 @@ def test_complex_series_error(setup_path):
184192
reread = read_hdf(path, "obj")
185193
tm.assert_series_equal(s, reread)
186194

195+
187196
def test_complex_append(setup_path):
188197
df = DataFrame(
189198
{"a": np.random.randn(100).astype(np.complex128), "b": np.random.randn(100)}

pandas/tests/io/pytables/test_timezones.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ def test_append_with_timezones_pytz(setup_path):
161161
assert_frame_equal(result, df)
162162

163163
# select with tz aware
164-
_compare_with_tz(
165-
store.select("df_tz", where="A>=df.A[3]"), df[df.A >= df.A[3]]
166-
)
164+
_compare_with_tz(store.select("df_tz", where="A>=df.A[3]"), df[df.A >= df.A[3]])
167165

168166
_maybe_remove(store, "df_tz")
169167
# ensure we include dates in DST and STD time here.

0 commit comments

Comments
 (0)