erdc / proteus

A computational methods and simulation toolkit
http://proteustoolkit.org
MIT License
88 stars 56 forks source link

Pytest changes for macOS. #1178

Closed ejtovar closed 4 years ago

ejtovar commented 4 years ago

Mandatory Checklist

Please ensure that the following criteria are met:

As a general rule of thumb, try to follow PEP8 guidelines.

Description

  1. Changed the pytest command in .travis.yml file to allow the tests to runon macOS.
  2. Added a test-macos command in the makefile that runs the basic tests suite.
  3. In a few tests, I added the command @pytest.mark.skipif(sys.platform == "darwin", reason="does not run on macOS") to skip particular tests when using macOS.
  4. Fixed a typo in test_CLSVOF_discICs.py. Changed class name TestSWEs to TestCLSVOF
codecov[bot] commented 4 years ago

Codecov Report

Merging #1178 into master will increase coverage by 0.01%. The diff coverage is 98.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1178      +/-   ##
==========================================
+ Coverage   50.70%   50.72%   +0.01%     
==========================================
  Files         541      541              
  Lines      109390   109397       +7     
==========================================
+ Hits        55466    55489      +23     
+ Misses      53924    53908      -16     
Impacted Files Coverage Δ
proteus/tests/mesh_tests/test_quads.py 72.38% <83.33%> (+1.09%) :arrow_up:
proteus/mprans/MoveMesh.py 86.35% <100.00%> (ø)
proteus/mprans/SW2DCV.py 90.69% <100.00%> (ø)
proteus/tests/AddedMass/test_addedmass3D.py 87.71% <100.00%> (+0.21%) :arrow_up:
...BernsteinPolynomials/poisson_eqn/test_bernstein.py 97.82% <100.00%> (+0.02%) :arrow_up:
...oteus/tests/CLSVOF/disc_ICs/test_CLSVOF_discICs.py 95.08% <100.00%> (ø)
proteus/tests/FSI/test_FSI.py 46.99% <100.00%> (+0.29%) :arrow_up:
proteus/tests/ci/test_poisson.py 95.19% <100.00%> (ø)
proteus/tests/test_analyticalSolutions.py 99.62% <100.00%> (ø)
proteus/tests/wave_tests/test_wavetools.py 99.25% <100.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8e7c357...7f5ff52. Read the comment docs.

cekees commented 4 years ago

Thanks @ejtovar . I think this is close enough that you can just relax the 4 remaining tests so that they pass (I guess they are already passing on your macbook?). We're just asking for too much precision on these, I think: FAILED proteus/tests/test_analyticalSolutions.py::test_diffusionSin1D FAILED proteus/tests/test_analyticalSolutions.py::test_diffusionSin2D FAILED proteus/tests/test_analyticalSolutions.py::test_STflowSphere_P FAILED proteus/tests/cylinder2D/ibm_rans2p_3D/test_cylinder3D_ibm_rans2p.py::Test_ibm::test_ex2

ejtovar commented 4 years ago

@cekees No they're not passing on my macbook. They did seem like a "precision" type failures which is why I didn't skip them.