Skip to content

Commit 9e14097

Browse files
authored
Merge branch 'main' into gh52234-nan-not-in-index
2 parents 8766cdf + bb0403b commit 9e14097

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

doc/source/getting_started/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ pandas is equipped with an exhaustive set of unit tests, covering about 97% of
216216
the code base as of this writing. To run it on your machine to verify that
217217
everything is working (and that you have all of the dependencies, soft and hard,
218218
installed), make sure you have `pytest
219-
<https://docs.pytest.org/en/latest/>`__ >= 7.0 and `Hypothesis
219+
<https://docs.pytest.org/en/latest/>`__ >= 7.3.2 and `Hypothesis
220220
<https://hypothesis.readthedocs.io/en/latest/>`__ >= 6.34.2, then run:
221221

222222
::

doc/source/whatsnew/v2.1.0.rst

+2
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ If installed, we now require:
194194
+-----------------+-----------------+----------+---------+
195195
| pytables | 3.7.0 | | X |
196196
+-----------------+-----------------+----------+---------+
197+
| pytest | 7.3.2 | | X |
198+
+-----------------+-----------------+----------+---------+
197199
| python-snappy | 0.6.1 | | X |
198200
+-----------------+-----------------+----------+---------+
199201
| pyxlsb | 1.0.9 | | X |

pandas/core/frame.py

+1
Original file line numberDiff line numberDiff line change
@@ -2981,6 +2981,7 @@ def to_orc(
29812981
1 2 3
29822982
29832983
If you want to get a buffer to the orc content you can write it to io.BytesIO
2984+
29842985
>>> import io
29852986
>>> b = io.BytesIO(df.to_orc()) # doctest: +SKIP
29862987
>>> b.seek(0) # doctest: +SKIP

pandas/tests/libs/test_hashtable.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def test_get_labels_groupby_for_Int64(writable):
461461

462462
def test_tracemalloc_works_for_StringHashTable():
463463
N = 1000
464-
keys = np.arange(N).astype(np.compat.unicode).astype(np.object_)
464+
keys = np.arange(N).astype(np.str_).astype(np.object_)
465465
with activated_tracemalloc():
466466
table = ht.StringHashTable()
467467
table.map_locations(keys)
@@ -484,7 +484,7 @@ def test_tracemalloc_for_empty_StringHashTable():
484484

485485
@pytest.mark.parametrize("N", range(1, 110))
486486
def test_no_reallocation_StringHashTable(N):
487-
keys = np.arange(N).astype(np.compat.unicode).astype(np.object_)
487+
keys = np.arange(N).astype(np.str_).astype(np.object_)
488488
preallocated_table = ht.StringHashTable(N)
489489
n_buckets_start = preallocated_table.get_state()["n_buckets"]
490490
preallocated_table.map_locations(keys)

pandas/tests/plotting/conftest.py

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
)
88

99

10+
@pytest.fixture(autouse=True)
11+
def non_interactive():
12+
mpl = pytest.importorskip("matplotlib")
13+
mpl.use("template")
14+
yield
15+
16+
1017
@pytest.fixture(autouse=True)
1118
def reset_rcParams():
1219
mpl = pytest.importorskip("matplotlib")
@@ -16,8 +23,11 @@ def reset_rcParams():
1623

1724
@pytest.fixture(autouse=True)
1825
def close_all_figures():
26+
# https://stackoverflow.com/q/31156578
1927
yield
2028
plt = pytest.importorskip("matplotlib.pyplot")
29+
plt.cla()
30+
plt.clf()
2131
plt.close("all")
2232

2333

0 commit comments

Comments
 (0)