We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c52a37 commit 40758e8Copy full SHA for 40758e8
testing/test_terminal.py
@@ -13,6 +13,7 @@
13
14
import pytest
15
from _pytest.main import ExitCode
16
+from _pytest.pytester import Testdir
17
from _pytest.reports import BaseReport
18
from _pytest.terminal import _folded_skips
19
from _pytest.terminal import _get_line_with_reprcrash_message
@@ -1923,3 +1924,11 @@ def test_collecterror(testdir):
1923
1924
"*= 1 error in *",
1925
]
1926
)
1927
+
1928
1929
+def test_via_exec(testdir: Testdir) -> None:
1930
+ p1 = testdir.makepyfile("exec('def test_via_exec(): pass')")
1931
+ result = testdir.runpytest(str(p1), "-vv")
1932
+ result.stdout.fnmatch_lines(
1933
+ ["test_via_exec.py::test_via_exec <- <string> PASSED*", "*= 1 passed in *"]
1934
+ )
0 commit comments