aragilar / pytest-mpi

Pytest plugin for working with MPI
https://pytest-mpi.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
19 stars 7 forks source link

Fix tests failing due to pytest changes #12

Closed aragilar closed 3 years ago

aragilar commented 4 years ago

bors r+

codecov[bot] commented 4 years ago

Codecov Report

Merging #12 (86f08d9) into master (e08f110) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         3    +1     
  Lines          116       124    +8     
=========================================
+ Hits           116       124    +8     
Impacted Files Coverage Δ
src/pytest_mpi/_helpers.py 100.00% <100.00%> (ø)

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 e08f110...86f08d9. Read the comment docs.

bors[bot] commented 4 years ago

Build failed:

opoplawski commented 4 years ago

Seems to fix tests for me with pytest 6.0.2, unless I'm running without any pytest plugins. Does that make sense?

opoplawski commented 4 years ago

Nope, it was just user error. Works for me.

aragilar commented 3 years ago

bors r+

bors[bot] commented 3 years ago

Build failed:

drew-parsons commented 3 years ago

As far as I can tell the PR needs to add

--- pytest-mpi.orig/tests/test_markers.py       2021-01-23 00:55:32.883507876 +0100
+++ pytest-mpi/tests/test_markers.py    2021-01-23 01:02:05.074814005 +0100
@@ -22,7 +22,7 @@

         assert comm.size >= 4

-    @pytest.mark.mpi(2)
+    @pytest.mark.mpi(min_size=2)
     def test_size_fail_pos():
         from mpi4py import MPI
         comm = MPI.COMM_WORLD

for test_size_fail_pos.

Otherwise it still gives the error

>                   raise ValueError("mpi mark does not take positional args")
E                   ValueError: mpi mark does not take positional args
aragilar commented 3 years ago

bors r+

bors[bot] commented 3 years ago

Build failed: