]> git.pld-linux.org Git - packages/python3.git/blame - python3-tests_with_pythonpath.patch
- rel 2; rediff patches
[packages/python3.git] / python3-tests_with_pythonpath.patch
CommitLineData
b10abc3a
AM
1diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_asyncio/test_tasks.py Python-3.9.2/Lib/test/test_asyncio/test_tasks.py
2--- Python-3.9.2.org/Lib/test/test_asyncio/test_tasks.py 2021-02-19 13:31:44.000000000 +0100
3+++ Python-3.9.2/Lib/test/test_asyncio/test_tasks.py 2021-02-25 18:41:41.098779547 +0100
b592c0a2
AM
4@@ -6,6 +6,7 @@ import contextvars
5 import functools
6 import gc
7 import io
8+import os
9 import random
10 import re
11 import sys
b10abc3a 12@@ -3283,6 +3284,7 @@ class GatherTestsBase:
3efd6e92
JK
13 cb.assert_called_once_with(fut)
14 self.assertEqual(fut.result(), [3, 1, exc, exc2])
15
16+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
17 def test_env_var_debug(self):
b10abc3a
AM
18 code = '\n'.join((
19 'import asyncio.coroutines',
20diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_cmd_line.py Python-3.9.2/Lib/test/test_cmd_line.py
21--- Python-3.9.2.org/Lib/test/test_cmd_line.py 2021-02-19 13:31:44.000000000 +0100
22+++ Python-3.9.2/Lib/test/test_cmd_line.py 2021-02-25 18:41:41.098779547 +0100
23@@ -265,6 +265,7 @@ class CmdLineTest(unittest.TestCase):
7fbb63b9
JK
24 self.assertEqual(rc, 0)
25 self.assertTrue(data.startswith(b'x'), data)
26
27+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
28 def test_large_PYTHONPATH(self):
29 path1 = "ABCDE" * 100
30 path2 = "FGHIJ" * 100
b10abc3a 31@@ -280,6 +281,7 @@ class CmdLineTest(unittest.TestCase):
7fbb63b9
JK
32 self.assertIn(path1.encode('ascii'), out)
33 self.assertIn(path2.encode('ascii'), out)
34
35+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
36 def test_empty_PYTHONPATH_issue16309(self):
37 # On Posix, it is documented that setting PATH to the
38 # empty string is equivalent to not setting PATH at all,
b10abc3a
AM
39diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_compileall.py Python-3.9.2/Lib/test/test_compileall.py
40--- Python-3.9.2.org/Lib/test/test_compileall.py 2021-02-25 18:41:39.412060338 +0100
41+++ Python-3.9.2/Lib/test/test_compileall.py 2021-02-25 18:41:41.098779547 +0100
42@@ -486,6 +486,7 @@ class CommandLineTestsBase:
43 self.initfn = script_helper.make_script(self.pkgdir, '__init__', '')
44 self.barfn = script_helper.make_script(self.pkgdir, 'bar', '')
3efd6e92
JK
45
46+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
47 def test_no_args_compiles_path(self):
48 # Note that -l is implied for the no args case.
b10abc3a
AM
49 self._skip_if_sys_path_not_writable()
50@@ -495,6 +496,7 @@ class CommandLineTestsBase:
3efd6e92
JK
51 self.assertNotCompiled(self.initfn)
52 self.assertNotCompiled(self.barfn)
53
54+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
9b97d583 55 @without_source_date_epoch # timestamp invalidation test
3efd6e92 56 def test_no_args_respects_force_flag(self):
9b97d583 57 self._skip_if_sys_path_not_writable()
b10abc3a 58@@ -513,6 +515,7 @@ class CommandLineTestsBase:
3efd6e92
JK
59 mtime2 = os.stat(pycpath).st_mtime
60 self.assertNotEqual(mtime, mtime2)
61
62+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
63 def test_no_args_respects_quiet_flag(self):
b10abc3a 64 self._skip_if_sys_path_not_writable()
3efd6e92 65 script_helper.make_script(self.directory, 'baz', '')
b10abc3a
AM
66diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_pydoc.py Python-3.9.2/Lib/test/test_pydoc.py
67--- Python-3.9.2.org/Lib/test/test_pydoc.py 2021-02-19 13:31:44.000000000 +0100
68+++ Python-3.9.2/Lib/test/test_pydoc.py 2021-02-25 18:41:41.098779547 +0100
69@@ -885,6 +885,7 @@ class PydocImportTest(PydocBaseTest):
7fbb63b9
JK
70 self.addCleanup(rmtree, TESTFN)
71 importlib.invalidate_caches()
72
73+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
74 def test_badimport(self):
75 # This tests the fix for issue 5230, where if pydoc found the module
76 # but the module had an internal import error pydoc would report no doc
b10abc3a
AM
77diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_site.py Python-3.9.2/Lib/test/test_site.py
78--- Python-3.9.2.org/Lib/test/test_site.py 2021-02-19 13:31:44.000000000 +0100
79+++ Python-3.9.2/Lib/test/test_site.py 2021-02-25 18:41:41.098779547 +0100
80@@ -387,6 +387,7 @@ class ImportSideEffectTests(unittest.Tes
7fbb63b9
JK
81 """Restore sys.path"""
82 sys.path[:] = self.sys_path
83
84+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
85 def test_abs_paths(self):
86 # Make sure all imported modules have their __file__ and __cached__
87 # attributes as absolute paths. Arranging to put the Lib directory on
b10abc3a
AM
88diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_venv.py Python-3.9.2/Lib/test/test_venv.py
89--- Python-3.9.2.org/Lib/test/test_venv.py 2021-02-19 13:31:44.000000000 +0100
90+++ Python-3.9.2/Lib/test/test_venv.py 2021-02-25 18:41:41.098779547 +0100
91@@ -173,6 +173,7 @@ class BasicTest(BaseTest):
92 builder.upgrade_dependencies(fake_context)
3efd6e92 93
794b49fa 94 @requireVenvCreate
3efd6e92
JK
95+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
96 def test_prefixes(self):
97 """
98 Test that the prefix values are as expected.
b10abc3a 99@@ -310,6 +311,7 @@ class BasicTest(BaseTest):
3efd6e92
JK
100 # point to the venv being used to run the test, and we lose the link
101 # to the source build - so Python can't initialise properly.
794b49fa 102 @requireVenvCreate
3efd6e92
JK
103+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
104 def test_executable(self):
105 """
106 Test that the sys.executable value is as expected.
b10abc3a
AM
107@@ -406,6 +408,7 @@ class BasicTest(BaseTest):
108 self.assertEqual(out.strip(), 'False'.encode())
3efd6e92 109
794b49fa 110 @requireVenvCreate
3efd6e92
JK
111+@unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
112 class EnsurePipTest(BaseTest):
113 """Test venv module installation of pip."""
114 def assert_pip_not_installed(self):
b10abc3a
AM
115diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_warnings/__init__.py Python-3.9.2/Lib/test/test_warnings/__init__.py
116--- Python-3.9.2.org/Lib/test/test_warnings/__init__.py 2021-02-25 18:41:39.412060338 +0100
117+++ Python-3.9.2/Lib/test/test_warnings/__init__.py 2021-02-25 18:41:41.098779547 +0100
118@@ -1218,6 +1218,7 @@ class PyEnvironmentVariableTests(Environ
3efd6e92
JK
119
120 class BootstrapTest(unittest.TestCase):
121 @unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled")
122+ @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
123 def test_issue_8766(self):
124 # "import encodings" emits a warning whereas the warnings is not loaded
125 # or not completely loaded (warnings imports indirectly encodings by
This page took 0.111645 seconds and 4 git commands to generate.