MCPcopy Create free account
hub / github.com/pytest-dev/pytest / create_test_file

Method create_test_file

testing/test_assertrewrite.py:1819–1826  ·  view source on GitHub ↗
(self, pytester: Pytester, size: int)

Source from the content-addressed store, hash-verified

1817 assert _get_maxsize_for_saferepr(cast(Config, config)) == expected_size
1818
1819 def create_test_file(self, pytester: Pytester, size: int) -> None:
1820 pytester.makepyfile(
1821 f"""
1822 def test_very_long_string():
1823 text = "x" * {size}
1824 assert "hello world" in text
1825 """
1826 )
1827
1828 def test_default_verbosity(self, pytester: Pytester) -> None:
1829 self.create_test_file(pytester, DEFAULT_REPR_MAX_SIZE)

Callers 3

Calls 1

makepyfileMethod · 0.45

Tested by

no test coverage detected