summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-12-12 22:15:56 +0100
committerLudovic Courtès <ludo@gnu.org>2021-12-12 22:16:33 +0100
commit867dcbe3a10bedf894b71cfabd2db22ca8dc249e (patch)
treecf76973fef2768d8fe8455f750da573a66b7693f /gnu/packages/patches
parent915556639237231d906ea16c533a224dfb5fed73 (diff)
downloadguix-867dcbe3a10bedf894b71cfabd2db22ca8dc249e.tar.gz
gnu: python-pyflakes@2.2: Adjust tests for Python 3.9.
* gnu/packages/patches/python-pyflakes-test-location.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/python-xyz.scm (python-pyflakes-2.2): Use it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/python-pyflakes-test-location.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-pyflakes-test-location.patch b/gnu/packages/patches/python-pyflakes-test-location.patch
new file mode 100644
index 0000000000..ea2c50c82e
--- /dev/null
+++ b/gnu/packages/patches/python-pyflakes-test-location.patch
@@ -0,0 +1,42 @@
+This patch fixes test failure related to reported source code locations.
+It is a backport of this patch:
+
+  commit 6a5f38b5ab12260fde8a0463acd433bc2d34dbcf
+  Author: Louis Sautier <sautier.louis@gmail.com>
+  Date:   Sat Oct 3 02:37:53 2020 +0200
+
+      Fix tests with Python 3.9, closes #549 (#586)
+
+      Stop allowing failures on Python nightly.
+
+diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py
+index 128aa69..b728e65 100644
+--- a/pyflakes/test/test_api.py
++++ b/pyflakes/test/test_api.py
+@@ -515,6 +515,8 @@ def foo(bar=baz, bax):
+             if ERROR_HAS_LAST_LINE:
+                 if PYPY and sys.version_info >= (3,):
+                     column = 7
++                elif sys.version_info >= (3, 9):
++                    column = 21
+                 elif sys.version_info >= (3, 8):
+                     column = 9
+                 else:
+@@ -543,6 +545,8 @@ foo(bar=baz, bax)
+             if ERROR_HAS_LAST_LINE:
+                 if PYPY and sys.version_info >= (3,):
+                     column = 12
++                elif sys.version_info >= (3, 9):
++                    column = 17
+                 elif sys.version_info >= (3, 8):
+                     column = 14
+                 else:
+@@ -577,6 +581,8 @@ foo(bar=baz, bax)
+                 position_end = 1
+                 if PYPY:
+                     column = 6
++                elif ver >= (3, 9):
++                    column = 13
+                 else:
+                     column = 7
+                     # Column has been "fixed" since 3.2.4 and 3.3.1