Skip to content

Commit 767f2f9

Browse files
committed
dynamically change the server address in tests
1 parent 1b27b86 commit 767f2f9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pyscript.core/tests/integration/test_00_support.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,12 @@ def test_check_js_errors_multiple(self):
186186
#
187187
msg = str(exc.value)
188188
expected = textwrap.dedent(
189-
"""
189+
f"""
190190
JS errors found: 2
191191
Error: error 1
192-
at https://fake_server/mytest.html:.*
192+
at {self.http_server_addr}/mytest.html:.*
193193
Error: error 2
194-
at https://fake_server/mytest.html:.*
194+
at {self.http_server_addr}/mytest.html:.*
195195
"""
196196
).strip()
197197
assert re.search(expected, msg)
@@ -217,12 +217,12 @@ def test_check_js_errors_some_expected_but_others_not(self):
217217
#
218218
msg = str(exc.value)
219219
expected = textwrap.dedent(
220-
"""
220+
f"""
221221
JS errors found: 2
222222
Error: NOT expected 2
223-
at https://fake_server/mytest.html:.*
223+
at {self.http_server_addr}/mytest.html:.*
224224
Error: NOT expected 4
225-
at https://fake_server/mytest.html:.*
225+
at {self.http_server_addr}/mytest.html:.*
226226
"""
227227
).strip()
228228
assert re.search(expected, msg)
@@ -243,15 +243,15 @@ def test_check_js_errors_expected_not_found_but_other_errors(self):
243243
#
244244
msg = str(exc.value)
245245
expected = textwrap.dedent(
246-
"""
246+
f"""
247247
The following JS errors were expected but could not be found:
248248
- this is not going to be found
249249
---
250250
The following JS errors were raised but not expected:
251251
Error: error 1
252-
at https://fake_server/mytest.html:.*
252+
at {self.http_server_addr}/mytest.html:.*
253253
Error: error 2
254-
at https://fake_server/mytest.html:.*
254+
at {self.http_server_addr}/mytest.html:.*
255255
"""
256256
).strip()
257257
assert re.search(expected, msg)

0 commit comments

Comments
 (0)