Skip to content

Commit a831ba4

Browse files
committed
Hyphens in test names result in them not being discovered; rename to avoid.
Due to this test having been disabled a couple of things that it would have brought to our attention were missed and are additionally fixed here: * cgi has been removed from Python 3.13+ To remain compatible with PY2: * phrase the super calls in a way that appeasaes the old version * late FileNotExistsError addition that needs to be errno on OSError
1 parent 2fcc0d0 commit a831ba4

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# migrid core dependencies on a format suitable for pip install as described on
22
# https://pip.pypa.io/en/stable/reference/requirement-specifiers/
33
future
4+
5+
# cgi was removed from the standard library in Python 3.13
6+
legacy-cgi;python_version >= "3.13"
7+
48
# NOTE: python-3.6 and earlier versions require older pyotp, whereas 3.7+
59
# should work with any modern version. We tested 2.9.0 to work.
610
pyotp;python_version >= "3.7"

tests/support/snapshotsupp.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"""Test support code for the use of snapshots in tests."""
2828

2929
import difflib
30+
import errno
3031
import re
3132
import os
3233

@@ -36,8 +37,9 @@
3637

3738
try:
3839
os.mkdir(TEST_SNAPSHOTS_DIR)
39-
except FileExistsError:
40-
pass
40+
except OSError as direxc:
41+
if direxc.errno != errno.EEXIST: # FileExistsError
42+
raise
4143

4244

4345
def _delimited_lines(value):

tests/test_mig_wsgi-bin.py renamed to tests/test_mig_wsgibin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ def handle_data(self, *args, **kwargs):
109109
self._title = args[0]
110110

111111
def handle_starttag(self, tag, attrs):
112-
super().handle_starttag(tag, attrs)
112+
DocumentBasicsHtmlParser.handle_starttag(self, tag, attrs)
113113

114114
if tag == 'title':
115115
self._within_title = True
116116

117117
def handle_endtag(self, tag):
118-
super().handle_endtag(tag)
118+
DocumentBasicsHtmlParser.handle_endtag(self, tag)
119119

120120
if tag == 'title':
121121
self._within_title = False

0 commit comments

Comments
 (0)