We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd96abf commit e787447Copy full SHA for e787447
pandas/tests/series/methods/test_slice.py
@@ -1,5 +1,5 @@
1
import gc
2
-import pandas as pd
+
3
from pandas import Series
4
5
@@ -14,14 +14,14 @@ def count_dummy_instances():
14
15
16
def test_slicing_releases_dummy_instances():
17
- """Ensure slicing a Series does not retain references to original Dummy instances."""
+ """Ensure Series slicing does not retain references to original Dummy data."""
18
NDATA = 100_000
19
baseline = count_dummy_instances()
20
a = Series([Dummy(i) for i in range(NDATA)])
21
a = a[-1:]
22
gc.collect()
23
after = count_dummy_instances()
24
retained = after - baseline
25
- assert (
26
- retained <= 1
27
- ), f"{retained} Dummy instances were retained; expected at most 1"
+ assert retained <= 1, (
+ f"{retained} Dummy instances were retained; expected at most 1"
+ )
0 commit comments