Skip to content

Commit 9e899ef

Browse files
committed
redefined-outer-name: Add one more test case
Write the positive test of `redefined-outer-name` (#70) Signed-off-by: Stavros Ntentos <[email protected]>
1 parent 91941f9 commit 9e899ef

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/input/redefined-outer-name/caller_not_a_test_func.py

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ def this_is_a_fixture():
99
def not_a_test_function(this_is_a_fixture):
1010
# invalid test case...
1111
assert True
12+
13+
14+
def test_function_valid(this_is_a_fixture):
15+
assert True

tests/test_redefined_outer_name.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_caller_yield_fixture(self, enable_plugin):
2424
@pytest.mark.parametrize("enable_plugin", [True, False])
2525
def test_caller_not_a_test_func(self, enable_plugin):
2626
self.run_linter(enable_plugin)
27-
self.verify_messages(1)
27+
self.verify_messages(1 if enable_plugin else 2)
2828

2929
@pytest.mark.parametrize("enable_plugin", [True, False])
3030
def test_args_and_kwargs(self, enable_plugin):

0 commit comments

Comments
 (0)