summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_runpy.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2025-05-22 10:42:50 (GMT)
committerGitHub <noreply@github.com>2025-05-22 10:42:50 (GMT)
commitdb98e0bb127c469842dc119d23e5daacd23862cc (patch)
tree5628e04625c93f2e5bde25aa29dedb3c154a0dec /Lib/test/test_runpy.py
parentd5f7e80d4407655919b32bbd5746b23af174bc5b (diff)
downloadcpython-db98e0bb127c469842dc119d23e5daacd23862cc.zip
cpython-db98e0bb127c469842dc119d23e5daacd23862cc.tar.gz
cpython-db98e0bb127c469842dc119d23e5daacd23862cc.tar.bz2
[3.14] gh-71339: Use new assertion methods in tests (GH-129046) (GH-134498)
(cherry picked from commit 2602d8ae981c4bae1cada2c174b367d97f712efb) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test/test_runpy.py')
-rw-r--r--Lib/test/test_runpy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py
index ada78ec..a2a07c0 100644
--- a/Lib/test/test_runpy.py
+++ b/Lib/test/test_runpy.py
@@ -796,7 +796,7 @@ class TestExit(unittest.TestCase):
# Use -E to ignore PYTHONSAFEPATH
cmd = [sys.executable, '-E', *cmd]
proc = subprocess.run(cmd, *args, **kwargs, text=True, stderr=subprocess.PIPE)
- self.assertTrue(proc.stderr.endswith("\nKeyboardInterrupt\n"), proc.stderr)
+ self.assertEndsWith(proc.stderr, "\nKeyboardInterrupt\n")
self.assertEqual(proc.returncode, self.EXPECTED_CODE)
def test_pymain_run_file(self):