Skip to content

Commit c6898e6

Browse files
roed314claude
andcommitted
Make test_full_label assert the visible Label property
The previous assertion searched the whole page for the full label, which is already present in the "Underlying data", "All stored data" and "Coefficients" download URLs regardless of what the properties box shows. It therefore passed even with ('Label', short_label(self.label)) restored. Match the Label row rendered by templates/homepage.html instead, and check that both URL forms return 200 so an error page cannot satisfy the content assertion. Also assert the title still uses the short label, documenting the intended distinction between the two formats. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 3f89180 commit c6898e6

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

lmfdb/maass_forms/test_maass.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Tests for Maass waveforms.
33
44
"""
5+
import re
6+
57
from lmfdb.tests import LmfdbTest
68

79

@@ -51,11 +53,18 @@ def test_form_1234_long_label(self):
5153
assert "coefficients" in L.get_data(as_text=True) and "-1.236693" in L.get_data(as_text=True) and "1.858211" in L.get_data(as_text=True)
5254

5355
def test_full_label(self):
54-
# the full 5-component label should be displayed on the homepage,
55-
# whether it is reached via the short or the long form of the label
56+
# the full 5-component label should be visible in the properties box,
57+
# whether the page is reached via the short or the long form of the
58+
# label; the title keeps using the short form
5659
for url_label in ["2.32", "2.0.1.32.1"]:
5760
L = self.tc.get("/ModularForm/GL2/Q/Maass/" + url_label)
58-
assert "2.0.1.32.1" in L.get_data(as_text=True)
61+
assert L.status_code == 200
62+
page = L.get_data(as_text=True)
63+
assert re.search(
64+
r'<td class="label">\s*Label\s*</td>\s*<td>\s*2\.0\.1\.32\.1\s*</td>',
65+
page,
66+
)
67+
assert "Maass form 2.32" in page
5968

6069
def test_underlying_data(self):
6170
data = self.tc.get("/ModularForm/GL2/Q/Maass/data/42.42").get_data(as_text=True)

0 commit comments

Comments
 (0)