diff --git a/pmda/test/test_leaflet.py b/pmda/test/test_leaflet.py index 4e8ac099..cd7153bd 100644 --- a/pmda/test/test_leaflet.py +++ b/pmda/test/test_leaflet.py @@ -39,9 +39,11 @@ def correct_values_single_frame(self): return [np.arange(1, 2150, 12), np.arange(2521, 4670, 12)] # XFAIL for 2 jobs needs to be fixed! - @pytest.mark.parametrize('n_jobs', (pytest.mark.xfail(-1), - 1, - pytest.mark.xfail(2))) + @pytest.mark.parametrize('n_jobs', [ + pytest.param(-1, marks=pytest.mark.xfail), + 1, + pytest.param(2, marks=pytest.mark.xfail), + ]) def test_leaflet(self, universe, correct_values, n_jobs): lipid_heads = universe.select_atoms("name P and resname POPG") universe.trajectory.rewind() diff --git a/pmda/test/test_util.py b/pmda/test/test_util.py index a8aea221..5ad6524c 100644 --- a/pmda/test/test_util.py +++ b/pmda/test/test_util.py @@ -83,7 +83,7 @@ def _test_make_balanced_slices(n_blocks, start, stop, step, scale): if n_frames >= n_blocks: assert np.all(block_sizes > 0) minsize = n_frames // n_blocks - assert not np.setdiff1d(block_sizes, [minsize, minsize+1]), \ + assert len(np.setdiff1d(block_sizes, [minsize, minsize+1])) == 0, \ "For n_blocks <= n_frames, block sizes are not balanced" else: # pathological case; we will have blocks with length 0 @@ -91,7 +91,7 @@ def _test_make_balanced_slices(n_blocks, start, stop, step, scale): zero_blocks = block_sizes == 0 assert np.sum(zero_blocks) == n_blocks - n_frames assert np.sum(~zero_blocks) == n_frames - assert not np.setdiff1d(block_sizes[~zero_blocks], [1]), \ + assert len(np.setdiff1d(block_sizes[~zero_blocks], [1])) == 0, \ "For n_blocks>n_frames, some blocks contain != 1 frame"