Conversation
This unit test is failing on Travis only on Python 3.6 but not Python 3.5 on PR #20, and we can't make sense of why. This is mostly a "no change" pull request to trigger the CI tests, but I added a print(output) statement to help debug.
|
On the Python 3.6 stack in Travis the tests fail . We get this output: |
This adds a flag to pytest when running on Travis so that it reports the captured stdout even on passing unit tests, so we can compare.
|
The passing version, on Python 3.5, has this output: and here's the diff. annoyingly, the dictionaries are unsorted 1,10c1,5
< broken {
< 'model': 'h2o2.cti'
< 'datasets': [{
< 'dataset': 'testfile_st.yaml'
< 'dataset_id': 0
< 'standard deviation': 0.1
< 'datapoints': [{
< 'experimental ignition delay': '0.00047154 second'
< 'simulated ignition delay': '0.000999806876854139 second'
< 'temperature': '1164.48 kelvin'
---
> working {
> 'datasets': [{
> 'datapoints': [{
> 'simulated ignition delay': '0.0009996030198605602 second'
> 'experimental ignition delay': '0.00047154 second'
11a7
> 'temperature': '1164.48 kelvin'
13,14c9,10
< 'InChI': '1S/H2/h1H'
< 'species-name': 'H2'
---
> 'species-name': 'H2'
> 'InChI': '1S/H2/h1H'
18,19c14,15
< 'InChI': '1S/O2/c1-2'
< 'species-name': 'O2'
---
> 'species-name': 'O2'
> 'InChI': '1S/O2/c1-2'
23,24c19,20
< 'InChI': '1S/Ar'
< 'species-name': 'Ar'
---
> 'species-name': 'Ar'
> 'InChI': '1S/Ar'
30,32c26,27
< 'experimental ignition delay': '0.00044803 second'
< 'simulated ignition delay': '0.0009972202043260416 second'
< 'temperature': '1164.97 kelvin'
---
> 'simulated ignition delay': '0.0009954820845162022 second'
> 'experimental ignition delay': '0.00044803 second'
33a29
> 'temperature': '1164.97 kelvin'
35,36c31,32
< 'InChI': '1S/H2/h1H'
< 'species-name': 'H2'
---
> 'species-name': 'H2'
> 'InChI': '1S/H2/h1H'
40,41c36,37
< 'InChI': '1S/O2/c1-2'
< 'species-name': 'O2'
---
> 'species-name': 'O2'
> 'InChI': '1S/O2/c1-2'
45,46c41,42
< 'InChI': '1S/Ar'
< 'species-name': 'Ar'
---
> 'species-name': 'Ar'
> 'InChI': '1S/Ar'
52,54c48,49
< 'experimental ignition delay': '0.00029157 second'
< 'simulated ignition delay': '0.0005734834427541362 second'
< 'temperature': '1264.2 kelvin'
---
> 'simulated ignition delay': '0.0005738392264714885 second'
> 'experimental ignition delay': '0.00029157 second'
55a51
> 'temperature': '1264.2 kelvin'
57,58c53,54
< 'InChI': '1S/H2/h1H'
< 'species-name': 'H2'
---
> 'species-name': 'H2'
> 'InChI': '1S/H2/h1H'
62,63c58,59
< 'InChI': '1S/O2/c1-2'
< 'species-name': 'O2'
---
> 'species-name': 'O2'
> 'InChI': '1S/O2/c1-2'
67,68c63,64
< 'InChI': '1S/Ar'
< 'species-name': 'Ar'
---
> 'species-name': 'Ar'
> 'InChI': '1S/Ar'
74,76c70,71
< 'experimental ignition delay': '0.00020593 second'
< 'simulated ignition delay': '0.000421523255121319 second'
< 'temperature': '1332.57 kelvin'
---
> 'simulated ignition delay': '0.0004209878446795384 second'
> 'experimental ignition delay': '0.00020593 second'
77a73
> 'temperature': '1332.57 kelvin'
79,80c75,76
< 'InChI': '1S/H2/h1H'
< 'species-name': 'H2'
---
> 'species-name': 'H2'
> 'InChI': '1S/H2/h1H'
84,85c80,81
< 'InChI': '1S/O2/c1-2'
< 'species-name': 'O2'
---
> 'species-name': 'O2'
> 'InChI': '1S/O2/c1-2'
89,90c85,86
< 'InChI': '1S/Ar'
< 'species-name': 'Ar'
---
> 'species-name': 'Ar'
> 'InChI': '1S/Ar'
96,98c92,93
< 'experimental ignition delay': '8.811e-05 second'
< 'simulated ignition delay': '0.0002116988585442861 second'
< 'temperature': '1519.18 kelvin'
---
> 'simulated ignition delay': '0.0002114426078483022 second'
> 'experimental ignition delay': '8.811e-05 second'
99a95
> 'temperature': '1519.18 kelvin'
101,102c97,98
< 'InChI': '1S/H2/h1H'
< 'species-name': 'H2'
---
> 'species-name': 'H2'
> 'InChI': '1S/H2/h1H'
106,107c102,103
< 'InChI': '1S/O2/c1-2'
< 'species-name': 'O2'
---
> 'species-name': 'O2'
> 'InChI': '1S/O2/c1-2'
111,112c107,108
< 'InChI': '1S/Ar'
< 'species-name': 'Ar'
---
> 'species-name': 'Ar'
> 'InChI': '1S/Ar'
117,118c113,117
< 'error function': 58.882651168057734
< 'absolute deviation': 7.64207193590874
---
> 'dataset': 'testfile_st.yaml'
> 'absolute deviation': 7.634451187255257
> 'dataset_id': 0
> 'error function': 58.75871579871307
> 'standard deviation': 0.1
120c119,120
< 'average error function': 58.882651168057734
---
> 'model': 'h2o2.cti'
> 'average deviation function': 7.634451187255257
122,123c122,123
< 'average deviation function': 7.64207193590874
< }
\ No newline at end of file
---
> 'average error function': 58.75871579871307
> }
(default) Richards-iMac:Desktop rwest$ |
|
Converted them to json and used http://www.jsondiff.com I suggest we just relax the tolerance on the test? |

This unit test is failing on Travis only on Python 3.6 but not Python 3.5 on PR #20,
and we can't make sense of why. This is mostly a "no change" pull request to trigger
the CI tests, but I added a print(output) statement to help debug.