Skip to content

Commit 32a27f6

Browse files
committed
Use pytest-style names in the tests
1 parent 040975d commit 32a27f6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/test_pytest_mypy.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,29 @@ def xdist_args(request):
1414
return ['-n', 'auto'] if request.param else []
1515

1616

17-
@pytest.mark.parametrize('test_count', [1, 2])
18-
def test_mypy_success(testdir, test_count, xdist_args):
17+
@pytest.mark.parametrize('pyfile_count', [1, 2])
18+
def test_mypy_success(testdir, pyfile_count, xdist_args):
1919
"""Verify that running on a module with no type errors passes."""
2020
testdir.makepyfile(
2121
**{
22-
'test_' + str(test_i): '''
23-
def myfunc(x: int) -> int:
22+
'pyfile_' + str(pyfile_i): '''
23+
def pyfunc(x: int) -> int:
2424
return x * 2
2525
'''
26-
for test_i in range(test_count)
26+
for pyfile_i in range(pyfile_count)
2727
}
2828
)
2929
result = testdir.runpytest_subprocess(*xdist_args)
3030
result.assert_outcomes()
3131
result = testdir.runpytest_subprocess('--mypy', *xdist_args)
32-
result.assert_outcomes(passed=test_count)
32+
result.assert_outcomes(passed=pyfile_count)
3333
assert result.ret == 0
3434

3535

3636
def test_mypy_error(testdir, xdist_args):
3737
"""Verify that running on a module with type errors fails."""
3838
testdir.makepyfile('''
39-
def myfunc(x: int) -> str:
39+
def pyfunc(x: int) -> str:
4040
return x * 2
4141
''')
4242
result = testdir.runpytest_subprocess(*xdist_args)
@@ -178,7 +178,7 @@ def pytest_collection_modifyitems(session, config, items):
178178
items.pop(mypy_item_i)
179179
''')
180180
testdir.makepyfile('''
181-
def myfunc(x: int) -> str:
181+
def pyfunc(x: int) -> str:
182182
return x * 2
183183
184184
def test_pass():

0 commit comments

Comments
 (0)