We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66d94be commit 1f94480Copy full SHA for 1f94480
Lib/test/test_exceptions.py
@@ -328,8 +328,7 @@ def baz():
328
@support.requires_resource('cpu')
329
@support.bigmemtest(INT_MAX, memuse=2, dry_run=False)
330
def testMemoryErrorBigSource(self, size):
331
- padding_needed = INT_MAX - len("pass")
332
- src = f"if True:\n{' ' * padding_needed}pass"
+ src = b"if True:\n%*s" % (INT_MAX, b"pass")
333
with self.assertRaisesRegex(OverflowError, "Parser column offset overflow"):
334
compile(src, '<fragment>', 'exec')
335
0 commit comments