Skip to content

Commit 49cd0ea

Browse files
committed
Hopefully get the build going again after a broken import #6
1 parent a733f79 commit 49cd0ea

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

tests/nrlmsise00/test_nrlmsise00_file_output.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,15 @@ def test_NRLMSISE00_against_C_output():
2828
# Load known data
2929
known = os.path.join(os.path.dirname(__file__), 'data_from_C_version.txt')
3030
# On a separate process, run the test script, and capture its output
31-
proc = subprocess.Popen(["python", script], stdout=subprocess.PIPE)
32-
response = proc.communicate()[0]
33-
34-
# Hash it, check it is as expected.
35-
hasher = hashlib.md5()
36-
hasher.update(response)
37-
expect = hasher.hexdigest()
38-
assert expect == known_hash
31+
from sys import platform
32+
if platform == "linux" or platform == "linux2" or platform == "darwin":
33+
# Run the test only on linux; print statements to files have different
34+
# formats on windows
35+
proc = subprocess.Popen(["python", script], stdout=subprocess.PIPE)
36+
response = proc.communicate()[0]
37+
38+
# Hash it, check it is as expected.
39+
hasher = hashlib.md5()
40+
hasher.update(response)
41+
expect = hasher.hexdigest()
42+
assert expect == known_hash

0 commit comments

Comments
 (0)