I just apply this patch and the import test PASS.
I took only a part of the upstream patch
but now I get this
I: pybuild base:184: cd /<<PKGBUILDDIR>>/.pybuild/pythonX.Y_3.5/build;
python3.5 -m pytest test
============================= test session starts ==============================
platform linux -- Python 3.5.2+, pytest-3.0.3, py-1.4.31, pluggy-0.4.0
rootdir: /<<PKGBUILDDIR>>, inifile: pytest.ini
collected 257 items / 1 errors
==================================== ERRORS ====================================
____ ERROR collecting .pybuild/pythonX.Y_3.5/build/test/test_integration.py ____
test/conftest.py:59: in pytest_generate_tests
cases = list(run.collect_dir_tests(base_dir, test_files))
test/run.py:293: in collect_dir_tests
source = open(path).read()
/usr/lib/python3.5/encodings/ascii.py:26: in decode
return codecs.ascii_decode(input, self.errors)[0]
E UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 331:
ordinal not in range(128)
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 4.38 seconds ============================
Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
python-jedi (0.9.0-1) unstable; urgency=medium
.
* New upstream release
* debian/watch: use pypi.debian.net redirector
Author: Piotr Ożarowski <pi...@debian.org>
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2016-11-16
--- python-jedi-0.9.0.orig/test/test_integration_import.py
+++ python-jedi-0.9.0/test/test_integration_import.py
@@ -18,22 +18,22 @@ def test_goto_definition_on_import():
def test_complete_on_empty_import():
assert Script("from datetime import").completions()[0].name == 'import'
# should just list the files in the directory
- assert 10 < len(Script("from .", path='').completions()) < 30
+ assert 10 < len(Script("from .", path='whatever.py').completions()) < 30
# Global import
- assert len(Script("from . import", 1, 5, '').completions()) > 30
+ assert len(Script("from . import", 1, 5, 'whatever.py').completions()) > 30
# relative import
- assert 10 < len(Script("from . import", 1, 6, '').completions()) < 30
+ assert 10 < len(Script("from . import", 1, 6, 'whatever.py').completions()) < 30
# Global import
- assert len(Script("from . import classes", 1, 5, '').completions()) > 30
+ assert len(Script("from . import classes", 1, 5, 'whatever.py').completions()) > 30
# relative import
- assert 10 < len(Script("from . import classes", 1, 6, '').completions()) < 30
+ assert 10 < len(Script("from . import classes", 1, 6, 'whatever.py').completions()) < 30
wanted = set(['ImportError', 'import', 'ImportWarning'])
assert set([c.name for c in Script("import").completions()]) == wanted
if not is_py26: # python 2.6 doesn't always come with a library `import*`.
- assert len(Script("import import", path='').completions()) > 0
+ assert len(Script("import import", path='whatever.py').completions()) > 0
# 111
assert Script("from datetime import").completions()[0].name == 'import'