Skip to content

Commit 792584a

Browse files
committed
fixup: fix update-server tests on windows
same colorama problem we saw a while ago from pytest-dev/pytest#3434
1 parent d16f0c4 commit 792584a

File tree

3 files changed

+63
-51
lines changed

3 files changed

+63
-51
lines changed

update-server/Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ sphinx = "==1.4.8"
2222
twine = "==1.12.1"
2323
wheel = "==0.30.0"
2424
coverage = "==4.4.2"
25+
colorama = "*"
2526

2627

2728
[requires]

update-server/Pipfile.lock

Lines changed: 57 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

update-server/tests/buildroot/conftest.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@ def extracted_update_file(request, tmpdir):
6161
if request.node.get_marker('bad_hash'):
6262
hashval = b'0oas0ajcs0asd0asjc0ans0d9ajsd0ian0s9djas'
6363
else:
64-
shasum_out = subprocess.check_output(
65-
['shasum', '-a', '256', rootfs_path])
64+
try:
65+
shasum_out = subprocess.check_output(
66+
['shasum', '-a', '256', rootfs_path])
67+
except subprocess.CalledProcessError:
68+
pytest.skip("no shasum invokeable on command line")
6669
hashval = re.match(b'^([a-z0-9]+) ', shasum_out).group(1)
6770
with open(hash_path, 'wb') as rfsh:
6871
rfsh.write(hashval)

0 commit comments

Comments
 (0)