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

Function test_issue731

testing/test_assertrewrite.py:1247–1263  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1245
1246
1247def test_issue731(pytester: Pytester) -> None:
1248 pytester.makepyfile(
1249 """
1250 class LongReprWithBraces(object):
1251 def __repr__(self):
1252 return 'LongReprWithBraces({' + ('a' * 80) + '}' + ('a' * 120) + ')'
1253
1254 def some_method(self):
1255 return False
1256
1257 def test_long_repr():
1258 obj = LongReprWithBraces()
1259 assert obj.some_method()
1260 """
1261 )
1262 result = pytester.runpytest()
1263 result.stdout.no_fnmatch_line("*unbalanced braces*")
1264
1265
1266class TestIssue925:

Callers

nothing calls this directly

Calls 3

no_fnmatch_lineMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected