Closed kbarnhart closed 6 years ago
Looks like in non OSX 3.5 or 3.6 builds we are getting errors that have to do with the random number generations. However, there are other tests that deal with random numbers AND, the randomization is tested as cross platform and version compatible by landlab and numpy, so my next best guess is that the error has to do with rounding. I'll try standardizing that and testing.
================================== FAILURES ===================================
2405________________________ test_run_stochastic_opt_true _________________________
2406Traceback (most recent call last):
2407 File "C:\projects\terrainbento\tests\test_stochastic_erosion_model.py", line 72, in test_run_stochastic_opt_true
2408 np.mean(dry_times), params["mean_interstorm_duration"], decimal=1
2409 File "c:\miniconda35-x64\lib\site-packages\numpy\testing\utils.py", line 539, in assert_almost_equal
2410 raise AssertionError(_build_err_msg())
2411AssertionError:
2412Arrays are not almost equal to 1 decimals
2413 ACTUAL: 3.073623548263571
2414 DESIRED: 3.0
2415_________________ test_finalize_opt_duration_stochastic_false _________________
2416Traceback (most recent call last):
2417 File "C:\projects\terrainbento\tests\test_stochastic_erosion_model.py", line 405, in test_finalize_opt_duration_stochastic_false
2418 assert filecmp.cmp("storm_sequence.txt", truth_file) == True
2419AssertionError: assert False == True
2420 + where False = <function cmp at 0x00000043F98418C8>('storm_sequence.txt', 'C:\\projects\\terrainbento\\tests\\data\\opt_dur_false_storm_sequence.txt')
2421 + where <function cmp at 0x00000043F98418C8> = filecmp.cmp
2422_________________ test_finalize_opt_duration_stochastic_true __________________
2423Traceback (most recent call last):
2424 File "C:\projects\terrainbento\tests\test_stochastic_erosion_model.py", line 439, in test_finalize_opt_duration_stochastic_true
2425 assert filecmp.cmp("storm_sequence.txt", truth_file) == True
2426AssertionError: assert False == True
2427 + where False = <function cmp at 0x00000043F98418C8>('storm_sequence.txt', 'C:\\projects\\terrainbento\\tests\\data\\opt_dur_true_storm_sequence.txt')
2428 + where <function cmp at 0x00000043F98418C8> = filecmp.cmp
2429
alrighty. this only has errors related to random number generation on windows. I'm going to merge and deal with that issue in a separate PR.
This PR finishes addressing #45, #46, and #47