Skip to content

Commit

Permalink
Remove redundant test
Browse files Browse the repository at this point in the history
  • Loading branch information
sadra-barikbin committed Jun 27, 2024
1 parent e7e7719 commit 859979f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 37 deletions.
34 changes: 0 additions & 34 deletions testing/python/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -4878,37 +4878,3 @@ def test_result():
)
result = pytester.runpytest()
assert result.ret == 0


def test_reordering_in_multiple_parametrization(pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
@pytest.mark.parametrize("arg2", [3, 4])
@pytest.mark.parametrize("arg1", [0, 1, 2], scope='module')
def test1(arg1, arg2):
pass
def test2():
pass
@pytest.mark.parametrize("arg1", [0, 1, 2], scope='module')
def test3(arg1):
pass
"""
)
result = pytester.runpytest("--collect-only")
result.stdout.re_match_lines(
[
r" <Function test1\[0-3\]>",
r" <Function test3\[0\]>",
r" <Function test1\[0-4\]>",
r" <Function test3\[1\]>",
r" <Function test1\[1-3\]>",
r" <Function test3\[2\]>",
r" <Function test1\[1-4\]>",
r" <Function test1\[2-3\]>",
r" <Function test1\[2-4\]>",
r" <Function test2>",
]
)
6 changes: 3 additions & 3 deletions testing/python/metafunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,14 +1005,14 @@ def test3(arg1):
result.stdout.re_match_lines(
[
r" <Function test1\[0-3\]>",
r" <Function test1\[0-4\]>",
r" <Function test3\[0\]>",
r" <Function test1\[0-4\]>",
r" <Function test3\[1\]>",
r" <Function test1\[1-3\]>",
r" <Function test3\[2\]>",
r" <Function test1\[1-4\]>",
r" <Function test3\[1\]>",
r" <Function test1\[2-3\]>",
r" <Function test1\[2-4\]>",
r" <Function test3\[2\]>",
r" <Function test2>",
]
)
Expand Down

0 comments on commit 859979f

Please sign in to comment.