]> git.pld-linux.org Git - packages/python3.git/blob - python3-tests_with_pythonpath.patch
move pdb/profile/pstats from -devel-tools to -modules
[packages/python3.git] / python3-tests_with_pythonpath.patch
1 diff -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
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
12 @@ -3283,6 +3284,7 @@ class GatherTestsBase:
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):
18          code = '\n'.join((
19              'import asyncio.coroutines',
20 diff -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):
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
31 @@ -280,6 +281,7 @@ class CmdLineTest(unittest.TestCase):
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,
39 --- Python-3.10.6/Lib/test/test_compileall.py.orig      2022-08-21 08:24:26.562151782 +0200
40 +++ Python-3.10.6/Lib/test/test_compileall.py   2022-08-22 16:36:51.754553471 +0200
41 @@ -508,6 +508,7 @@ class CommandLineTestsBase:
42          path = importlib.util.cache_from_source(fn)
43          self.assertFalse(os.path.exists(path))
44  
45 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
46      def test_no_args_compiles_path(self):
47          # Note that -l is implied for the no args case.
48          bazfn = script_helper.make_script(self.directory, 'baz', '')
49 @@ -517,6 +518,7 @@ class CommandLineTestsBase:
50              self.assertNotCompiled(self.initfn)
51              self.assertNotCompiled(self.barfn)
52  
53 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
54      @without_source_date_epoch  # timestamp invalidation test
55      def test_no_args_respects_force_flag(self):
56          bazfn = script_helper.make_script(self.directory, 'baz', '')
57 @@ -535,6 +537,7 @@ class CommandLineTestsBase:
58          mtime2 = os.stat(pycpath).st_mtime
59          self.assertNotEqual(mtime, mtime2)
60  
61 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
62      def test_no_args_respects_quiet_flag(self):
63          script_helper.make_script(self.directory, 'baz', '')
64          with self.temporary_pycache_prefix() as env:
65 diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_pydoc.py Python-3.9.2/Lib/test/test_pydoc.py
66 --- Python-3.9.2.org/Lib/test/test_pydoc.py     2021-02-19 13:31:44.000000000 +0100
67 +++ Python-3.9.2/Lib/test/test_pydoc.py 2021-02-25 18:41:41.098779547 +0100
68 @@ -885,6 +885,7 @@ class PydocImportTest(PydocBaseTest):
69          self.addCleanup(rmtree, TESTFN)
70          importlib.invalidate_caches()
71  
72 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
73      def test_badimport(self):
74          # This tests the fix for issue 5230, where if pydoc found the module
75          # but the module had an internal import error pydoc would report no doc
76 diff -urNp -x '*.orig' Python-3.9.2.org/Lib/test/test_venv.py Python-3.9.2/Lib/test/test_venv.py
77 --- Python-3.9.2.org/Lib/test/test_venv.py      2021-02-19 13:31:44.000000000 +0100
78 +++ Python-3.9.2/Lib/test/test_venv.py  2021-02-25 18:41:41.098779547 +0100
79 @@ -173,6 +173,7 @@ class BasicTest(BaseTest):
80                  builder.upgrade_dependencies(fake_context)
81  
82      @requireVenvCreate
83 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
84      def test_prefixes(self):
85          """
86          Test that the prefix values are as expected.
87 @@ -310,6 +311,7 @@ class BasicTest(BaseTest):
88      # point to the venv being used to run the test, and we lose the link
89      # to the source build - so Python can't initialise properly.
90      @requireVenvCreate
91 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
92      def test_executable(self):
93          """
94          Test that the sys.executable value is as expected.
95 @@ -406,6 +408,7 @@ class BasicTest(BaseTest):
96          self.assertEqual(out.strip(), 'False'.encode())
97  
98  @requireVenvCreate
99 +@unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
100  class EnsurePipTest(BaseTest):
101      """Test venv module installation of pip."""
102      def assert_pip_not_installed(self):
103 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
104 --- Python-3.9.2.org/Lib/test/test_warnings/__init__.py 2021-02-25 18:41:39.412060338 +0100
105 +++ Python-3.9.2/Lib/test/test_warnings/__init__.py     2021-02-25 18:41:41.098779547 +0100
106 @@ -1218,6 +1218,7 @@ class PyEnvironmentVariableTests(Environ
107  
108  class BootstrapTest(unittest.TestCase):
109      @unittest.skipUnless(support.is_resource_enabled("cmdline"), "python cmdline tests disabled")
110 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
111      def test_issue_8766(self):
112          # "import encodings" emits a warning whereas the warnings is not loaded
113          # or not completely loaded (warnings imports indirectly encodings by
This page took 0.040414 seconds and 3 git commands to generate.