File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,15 @@ def test_NRLMSISE00_against_C_output():
28
28
# Load known data
29
29
known = os .path .join (os .path .dirname (__file__ ), 'data_from_C_version.txt' )
30
30
# 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
You can’t perform that action at this time.
0 commit comments