Skip to content

Commit 4e11ead

Browse files
committed
TEST: Py37 compatibility hack
1 parent 51d45c1 commit 4e11ead

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

niworkflows/interfaces/tests/test_bids.py

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323
"""Tests on BIDS compliance."""
24+
import sys
2425
import os
2526
from pathlib import Path
2627
import json
@@ -348,6 +349,10 @@ def test_DerivativesDataSink_build_path(
348349
assert not np.isnan(hdr["scl_slope"])
349350
assert not np.isnan(hdr["scl_inter"])
350351
for out, chksum in zip(output, checksum):
352+
if chksum == "f7b8755c6ad0d8dcdb60676331b52a23ce288b61" and sys.version_info < (3, 8):
353+
# Python 3.8 began preserving insertion order of attributes in XML
354+
# Therefore we get a different checksum before/after
355+
chksum = "a37ffb1188dd9a7b708de5b8daef46dac56ef8d4"
351356
assert sha1(Path(out).read_bytes()).hexdigest() == chksum
352357

353358

0 commit comments

Comments
 (0)