Skip to content

Commit a2e781a

Browse files
committed
Improve test suite compatibility with Windows
1 parent fbabd9f commit a2e781a

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

tests/stub/conftest.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,15 @@ def wait(self):
5555
while True:
5656
return_code = self._process.poll()
5757
if return_code is not None:
58-
line = self._process.stdout.readline().decode("utf-8")
59-
if line == "":
58+
line = self._process.stdout.readline()
59+
if not line:
6060
break
61-
log.debug(line.strip("\n"))
61+
try:
62+
line = line.decode("utf-8")
63+
line = line.strip("\n")
64+
except UnicodeDecodeError:
65+
pass
66+
log.debug(line)
6267

6368
return True
6469

tox.ini

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ passenv =
2020
NEO4J_URI
2121
AWS_ACCESS_KEY_ID
2222
AWS_SECRET_ACCESS_KEY
23+
APPDATA
24+
LOCALAPPDATA
25+
ProgramData
26+
windir
27+
ProgramFiles
28+
ProgramFiles(x86)
29+
ProgramW6432
30+
# APPDATA and below are needed for Neo4j >=4.3 service to run on Windows
2331
deps =
2432
-r tests/requirements.txt
2533
commands =

0 commit comments

Comments
 (0)