guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: python-jedi: Fix test failure on some file s


From: guix-commits
Subject: branch master updated: gnu: python-jedi: Fix test failure on some file systems.
Date: Thu, 16 Apr 2020 18:52:04 -0400

This is an automated email from the git hooks/post-receive script.

mbakke pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new bff70d9  gnu: python-jedi: Fix test failure on some file systems.
bff70d9 is described below

commit bff70d93d22b049c0c4ea3bd234d39f05f794b28
Author: Marius Bakke <address@hidden>
AuthorDate: Fri Apr 17 00:51:48 2020 +0200

    gnu: python-jedi: Fix test failure on some file systems.
    
    Reported by sirgazil on #guix.
    
    * gnu/packages/patches/python-jedi-sort-project-test.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
    * gnu/packages/python-xyz.scm (python-jedi)[source](patches): Add it.
    [arguments]: Run tests more verbosely while at it.
---
 gnu/local.mk                                           |  1 +
 .../patches/python-jedi-sort-project-test.patch        | 18 ++++++++++++++++++
 gnu/packages/python-xyz.scm                            |  3 ++-
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 952fc55..af79f9a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1364,6 +1364,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
   %D%/packages/patches/python-pyfakefs-remove-bad-test.patch   \
   %D%/packages/patches/python-flint-includes.patch             \
+  %D%/packages/patches/python-jedi-sort-project-test.patch     \
   %D%/packages/patches/python-libxml2-utf8.patch               \
   %D%/packages/patches/python-mox3-python3.6-compat.patch      \
   %D%/packages/patches/python-testtools.patch                  \
diff --git a/gnu/packages/patches/python-jedi-sort-project-test.patch 
b/gnu/packages/patches/python-jedi-sort-project-test.patch
new file mode 100644
index 0000000..b2d602d
--- /dev/null
+++ b/gnu/packages/patches/python-jedi-sort-project-test.patch
@@ -0,0 +1,18 @@
+Sort the result of file system traversal to avoid test failure on different
+file systems.
+
+Taken from upstream:
+https://github.com/davidhalter/jedi/commit/7ff76bb7d0d94514e17cd1647f4ffaf533dd55f5
+
+diff --git a/test/test_api/test_project.py b/test/test_api/test_project.py
+--- a/test/test_api/test_project.py
++++ b/test/test_api/test_project.py
+@@ -135,7 +135,7 @@ def test_search(string, full_names, kwargs, 
skip_pre_python36):
+         defs = project.complete_search(string, **kwargs)
+     else:
+         defs = project.search(string, **kwargs)
+-    assert [('stub:' if d.is_stub() else '') + d.full_name for d in defs] == 
full_names
++    assert sorted([('stub:' if d.is_stub() else '') + d.full_name for d in 
defs]) == full_names
+ 
+ 
+ @pytest.mark.parametrize(
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e3ec001..2c54bfc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11898,6 +11898,7 @@ characters, mouse support, and auto suggestions.")
      (origin
        (method url-fetch)
        (uri (pypi-uri "jedi" version))
+       (patches (search-patches "python-jedi-sort-project-test.patch"))
        (sha256
         (base32
          "0c1h9x3a9klvk2g288wl328x8xgzw7136k6vs9hkd56b85vcjh6z"))))
@@ -11908,7 +11909,7 @@ characters, mouse support, and auto suggestions.")
          (replace 'check
            (lambda _
              (setenv "HOME" "/tmp")
-             (invoke "python" "-m" "pytest"))))))
+             (invoke "python" "-m" "pytest" "-vv"))))))
     (native-inputs
      `(("python-pytest" ,python-pytest)
        ("python-docopt" ,python-docopt)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]