aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-jedi-deleted-variables.patch
blob: 53bdc05cde68ff587096f4ffae13d3e04e9ffded (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Fix test failure in some environments, including Guix.

Taken from upstream:
https://github.com/davidhalter/jedi/commit/bec87f7ff82b0731713c6520a14c213341b4cecf

diff --git a/test/completion/basic.py b/test/completion/basic.py
index b40068179..3ff919ca6 100644
--- a/test/completion/basic.py
+++ b/test/completion/basic.py
@@ -209,11 +209,11 @@ def global_as_import():
 
 deleted_var = 3
 del deleted_var
-#? int()
+#?
 deleted_var
-#? ['deleted_var']
+#? []
 deleted_var
-#! ['deleted_var = 3']
+#! []
 deleted_var
 
 # -----------------
diff --git a/test/test_api/test_full_name.py b/test/test_api/test_full_name.py
index 4fdb861b0..6858b6ca8 100644
--- a/test/test_api/test_full_name.py
+++ b/test/test_api/test_full_name.py
@@ -112,7 +112,8 @@ def test_os_path(Script):
 
 def test_os_issues(Script):
     """Issue #873"""
-    assert [c.name for c in Script('import os\nos.nt''').complete()] == ['nt']
+    # nt is not found, because it's deleted
+    assert [c.name for c in Script('import os\nos.nt''').complete()] == []
 
 
 def test_param_name(Script):