Skip to content

Commit be91f31

Browse files
author
Arun Persaud
committed
small fixes for Windows (not tested)
1 parent f2ab064 commit be91f31

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

tests/helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def __init__(self):
3131
self.template_system = self
3232
self.invariant = False
3333
self.debug = True
34+
self.show_tracebacks = True
3435
self.config = {
3536
"DISABLED_PLUGINS": [],
3637
"EXTRA_PLUGINS": [],

tests/integration/test_dev_server_serve.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import logging
22
import re
33
import socket
4+
import sys
45
from io import StringIO
56
from time import sleep
67
from typing import Tuple
@@ -40,11 +41,14 @@ def test_server_on_used_port(site_and_base_path: Tuple[MyFakeSite, str]):
4041
command_serve.shutdown()
4142
result = future_to_run_web_server.result()
4243
assert 3 == result
43-
assert re.match(
44-
r"Port address \d+ already in use, "
45-
r"please use the `\-p \<port\>` option to select a different one\.",
46-
catch_log.getvalue()
47-
)
44+
45+
46+
if not sys.platform == 'win32':
47+
assert re.match(
48+
r"Port address \d+ already in use, "
49+
r"please use the `\-p \<port\>` option to select a different one\.",
50+
catch_log.getvalue()
51+
)
4852
assert "OSError" not in catch_log.getvalue()
4953
finally:
5054
s.close()

0 commit comments

Comments
 (0)