gnu: python-jedi: Fix test failure with Python 3.8.
authorMarius Bakke <mbakke@fastmail.com>
Tue, 21 Apr 2020 11:38:58 +0000 (13:38 +0200)
committerMarius Bakke <mbakke@fastmail.com>
Tue, 21 Apr 2020 22:08:26 +0000 (00:08 +0200)
* gnu/packages/python-xyz.scm (python-jedi)[arguments]: Add phase
'adjust-test-for-python-3.8'.

gnu/packages/python-xyz.scm

index c5e9c8e..86f4552 100644 (file)
@@ -11998,6 +11998,14 @@ characters, mouse support, and auto suggestions.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-before 'check 'adjust-test-for-python-3.8
+           (lambda _
+             ;; Mimic upstream commit e7feeef64 to allow for extra output lines
+             ;; in TestSetupReadline on Python 3.8.  Remove for jedi > 0.17.0.
+             (substitute* "test/test_utils.py"
+               (("assert len\\(difference\\) < 20")
+                "assert len(difference) < 22"))
+             #t))
          (replace 'check
            (lambda _
              (setenv "HOME" "/tmp")