mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-23 21:57:33 -08:00
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
From 6286442857de9f734686d08f0e59ca8048ee357a Mon Sep 17 00:00:00 2001
|
|
From: Vinay Sajip <vinay_sajip@yahoo.co.uk>
|
|
Date: Fri, 18 Jul 2025 07:59:29 +0100
|
|
Subject: [PATCH] Fix #251: Use more appropriate function in test.
|
|
|
|
--- a/tests/test_scripts.py
|
|
+++ b/tests/test_scripts.py
|
|
@@ -341,10 +341,8 @@ def test_dry_run(self):
|
|
def test_script_run(self):
|
|
if sys.version_info[:2] < (3, 13):
|
|
target = 'cgi:print_directory'
|
|
- elif os.name != 'nt':
|
|
- target = 'test.support.interpreters:list_all'
|
|
else:
|
|
- raise unittest.SkipTest('test not available on Windows for Python >= 3.13')
|
|
+ target = 'logging:getHandlerNames'
|
|
files = self.maker.make('test = %s' % target)
|
|
self.assertEqual(len(files), 2)
|
|
p = subprocess.Popen([sys.executable, files[0]], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
@@ -353,7 +351,7 @@ def test_script_run(self):
|
|
self.assertIn(b'<H3>Current Working Directory:</H3>', stdout)
|
|
self.assertIn(os.getcwd().encode('utf-8'), stdout)
|
|
else:
|
|
- self.assertIn(b'[Interpreter(0)]', stderr)
|
|
+ self.assertIn(b'frozenset(', stderr)
|
|
self.assertEqual(p.returncode, 1)
|
|
|
|
@unittest.skipUnless(os.name == 'posix', 'Test only valid for POSIX')
|