Skip to content

Commit 82f207d

Browse files
timtreisclaude
andcommitted
Remove superfluous comments from regression tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d198cf3 commit 82f207d

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

tests/pl/test_render.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ def test_single_ax_auto_cs_unresolvable_raises(sdata_multi_cs):
109109

110110

111111
def test_cs_name_with_apostrophe_does_not_crash():
112-
# Regression test for #602: .query(f"cs == '{cs}'") raised TokenError for names
113-
# containing single quotes (e.g. "patient's_sample").
112+
# Regression test for #602: .query(f"cs == '{cs}'") raised TokenError for cs names
113+
# containing single quotes.
114114
data = np.zeros((1, 10, 10), dtype=np.float64)
115115
img = Image2DModel.parse(data, dims=("c", "y", "x"))
116116
sdata = SpatialData(images={"img": img})
@@ -122,7 +122,6 @@ def test_cs_name_with_apostrophe_does_not_crash():
122122

123123
def test_get_cs_contents_is_linear():
124124
# Regression test for #602: pd.concat inside loop was O(n²).
125-
# Build two SpatialData objects: n=10 and n=50 coordinate systems.
126125
def build(n: int) -> SpatialData:
127126
data = np.zeros((1, 4, 4), dtype=np.float64)
128127
images = {}
@@ -137,7 +136,6 @@ def build(n: int) -> SpatialData:
137136
t10 = timeit.timeit(lambda: _get_cs_contents(sd10), number=20) / 20
138137
t50 = timeit.timeit(lambda: _get_cs_contents(sd50), number=20) / 20
139138
ratio = t50 / t10
140-
# O(n) → ratio ≈ 5×; O(n²) → ratio ≈ 25×. Allow generous headroom for CI variance.
141139
assert ratio < 15, (
142140
f"_get_cs_contents appears quadratic: n=10 {t10 * 1e3:.1f}ms, n=50 {t50 * 1e3:.1f}ms, ratio={ratio:.1f}x"
143141
)

0 commit comments

Comments
 (0)