-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathpython3-no_cmdline_tests.patch
41 lines (30 loc) · 1.93 KB
/
python3-no_cmdline_tests.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- Python-3.12.5/Lib/test/test_compileall.py~ 2024-08-06 21:08:49.000000000 +0200
+++ Python-3.12.5/Lib/test/test_compileall.py 2024-08-13 08:27:07.623262579 +0200
@@ -498,6 +498,7 @@ class EncodingTest(unittest.TestCase):
self.assertNotIn('UnicodeEncodeError', res)
+@unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled")
class CommandLineTestsBase:
"""Test compileall's CLI."""
diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_warnings/__init__.py Python-3.9.2/Lib/test/test_warnings/__init__.py
--- Python-3.9.2.org/Lib/test/test_warnings/__init__.py 2021-02-19 13:31:44.000000000 +0100
+++ Python-3.9.2/Lib/test/test_warnings/__init__.py 2021-02-25 18:40:29.876560976 +0100
@@ -1126,6 +1126,7 @@ class PyCatchWarningTests(CatchWarningTe
module = py_warnings
+@unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled")
class EnvironmentVariableTests(BaseTest):
def test_single_warning(self):
@@ -1278,9 +1278,11 @@ class EnvironmentVariableTests(BaseTest)
PYTHONDEVMODE="")
self.assertEqual(stdout, str([PYTHONWARNINGS]).encode())
+@unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled")
class CEnvironmentVariableTests(EnvironmentVariableTests, unittest.TestCase):
module = c_warnings
+@unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled")
class PyEnvironmentVariableTests(EnvironmentVariableTests, unittest.TestCase):
module = py_warnings
@@ -1326,6 +1328,7 @@ class _DeprecatedTest(BaseTest, unittest
class BootstrapTest(unittest.TestCase):
+ @unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled")
def test_issue_8766(self):
# "import encodings" emits a warning whereas the warnings is not loaded
# or not completely loaded (warnings imports indirectly encodings by