MCPcopy
hub / github.com/pytest-dev/pytest / test_dont_rewrite

Method test_dont_rewrite

testing/test_assertrewrite.py:342–347  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

340 """)
341
342 def test_dont_rewrite(self) -> None:
343 s = """'PYTEST_DONT_REWRITE'\nassert 14"""
344 m = rewrite(s)
345 assert len(m.body) == 2
346 assert isinstance(m.body[1], ast.Assert)
347 assert m.body[1].msg is None
348
349 def test_dont_rewrite_plugin(self, pytester: Pytester) -> None:
350 contents = {

Callers

nothing calls this directly

Calls 1

rewriteFunction · 0.85

Tested by

no test coverage detected