Skip to content

Commit bb7fd25

Browse files
authored
[test] Update testsuite to match python3.12 changes. NFC (emscripten-core#23698)
I'm not sure if it was a major or minor update but these changes are now needed with the latest version of python3.12 which is the default on my debian-based desktop at work.
1 parent 02b5a05 commit bb7fd25

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

test/parallel_testsuite.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ def __init__(self):
107107
def test(self):
108108
return self.buffered_result.test
109109

110+
def addDuration(self, test, elapsed):
111+
pass
112+
110113
def updateResult(self, result):
111114
result.startTest(self.test)
112115
self.buffered_result.updateResult(result)

test/test_other.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10371,7 +10371,7 @@ def test_wasm_sourcemap(self):
1037110371
# has "sourcesContent" entry with source code (included with `-s` option)
1037210372
self.assertIn('int foo()', output)
1037310373
# has some entries
10374-
self.assertRegexpMatches(output, r'"mappings":\s*"[A-Za-z0-9+/]')
10374+
self.assertRegex(output, r'"mappings":\s*"[A-Za-z0-9+/]')
1037510375

1037610376
def test_wasm_sourcemap_dead(self):
1037710377
wasm_map_cmd = [PYTHON, path_from_root('tools/wasm-sourcemap.py'),
@@ -10383,7 +10383,7 @@ def test_wasm_sourcemap_dead(self):
1038310383
self.run_process(wasm_map_cmd, stdout=PIPE, stderr=PIPE)
1038410384
output = read_file('a.out.wasm.map')
1038510385
# has only two entries
10386-
self.assertRegexpMatches(output, r'"mappings":\s*"[A-Za-z0-9+/]+,[A-Za-z0-9+/]+"')
10386+
self.assertRegex(output, r'"mappings":\s*"[A-Za-z0-9+/]+,[A-Za-z0-9+/]+"')
1038710387

1038810388
def test_wasm_sourcemap_relative_paths(self):
1038910389
ensure_dir('build')

0 commit comments

Comments
 (0)