Merge pull request #8399 from atzannes/master
closes #8394 Generated fixture names for unittest/xunit/nose should start with underscore
This commit is contained in:
committed by
GitHub
parent
6e7dc8bac8
commit
19a2f7425d
@@ -302,6 +302,30 @@ def test_setup_setUpClass(pytester: Pytester) -> None:
|
||||
reprec.assertoutcome(passed=3)
|
||||
|
||||
|
||||
def test_fixtures_setup_setUpClass_issue8394(pytester: Pytester) -> None:
|
||||
pytester.makepyfile(
|
||||
"""
|
||||
import unittest
|
||||
class MyTestCase(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
pass
|
||||
def test_func1(self):
|
||||
pass
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
pass
|
||||
"""
|
||||
)
|
||||
result = pytester.runpytest("--fixtures")
|
||||
assert result.ret == 0
|
||||
result.stdout.no_fnmatch_line("*no docstring available*")
|
||||
|
||||
result = pytester.runpytest("--fixtures", "-v")
|
||||
assert result.ret == 0
|
||||
result.stdout.fnmatch_lines(["*no docstring available*"])
|
||||
|
||||
|
||||
def test_setup_class(pytester: Pytester) -> None:
|
||||
testpath = pytester.makepyfile(
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user