]> git.pld-linux.org Git - packages/python3.git/blobdiff - python3-tests_with_pythonpath.patch
- up to 3.8.8; fixes CVE-2021-3177, CVE-2021-23336; speed up build
[packages/python3.git] / python3-tests_with_pythonpath.patch
index d2bc777278e84a01ee83f6f851da79cd713e3526..579ef1e36c9e6b67dcba014b95be5468706045ea 100644 (file)
@@ -49,14 +49,14 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_compileall.py Python-3.5.0/Lib
      def test_no_args_compiles_path(self):
          # Note that -l is implied for the no args case.
          bazfn = script_helper.make_script(self.directory, 'baz', '')
-@@ -214,6 +215,7 @@
+@@ -220,6 +220,7 @@ class CommandLineTestsBase:
          self.assertNotCompiled(self.initfn)
          self.assertNotCompiled(self.barfn)
  
 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
+     @without_source_date_epoch  # timestamp invalidation test
      def test_no_args_respects_force_flag(self):
-         bazfn = script_helper.make_script(self.directory, 'baz', '')
-         self.assertRunOK(PYTHONPATH=self.directory)
+         self._skip_if_sys_path_not_writable()
 @@ -230,6 +232,7 @@
          mtime2 = os.stat(pycpath).st_mtime
          self.assertNotEqual(mtime, mtime2)
@@ -87,29 +87,28 @@ diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_site.py Python-3.5.0/Lib/test/
      def test_abs_paths(self):
          # Make sure all imported modules have their __file__ and __cached__
          # attributes as absolute paths.  Arranging to put the Lib directory on
-diff -dur -x '*~' Python-3.5.0.orig/Lib/test/test_venv.py Python-3.5.0/Lib/test/test_venv.py
---- Python-3.5.0.orig/Lib/test/test_venv.py    2015-09-13 13:41:23.000000000 +0200
-+++ Python-3.5.0/Lib/test/test_venv.py 2015-12-03 18:35:52.227001621 +0100
-@@ -111,6 +111,7 @@
-         self.assertTrue(os.path.exists(fn), 'File %r should exist.' % fn)
+--- Python-3.7.4/Lib/test/test_venv.py~        2019-07-08 20:03:50.000000000 +0200
++++ Python-3.7.4/Lib/test/test_venv.py 2019-07-09 08:37:18.251706609 +0200
+@@ -129,6 +129,7 @@ class BasicTest(BaseTest):
+         self.assertEqual(context.prompt, '(My prompt) ')
  
-     @skipInVenv
+     @requireVenvCreate
 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
      def test_prefixes(self):
          """
          Test that the prefix values are as expected.
-@@ -249,6 +250,7 @@
+@@ -266,6 +267,7 @@ class BasicTest(BaseTest):
      # point to the venv being used to run the test, and we lose the link
      # to the source build - so Python can't initialise properly.
-     @skipInVenv
+     @requireVenvCreate
 +    @unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
      def test_executable(self):
          """
          Test that the sys.executable value is as expected.
-@@ -279,6 +281,7 @@
+@@ -326,6 +328,7 @@ class BasicTest(BaseTest):
+         self.assertEqual(out.strip(), "python".encode())
  
- @skipInVenv
+ @requireVenvCreate
 +@unittest.skipIf("PYTHONPATH" in os.environ, "$PYTHONPATH set")
  class EnsurePipTest(BaseTest):
      """Test venv module installation of pip."""
This page took 0.028318 seconds and 4 git commands to generate.