mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Merge branch 'dev' into bugfix/performances_degradation
# Conflicts: # test/test_regression.py
This commit is contained in:
@@ -14,6 +14,7 @@ import jedi
|
||||
from jedi._compatibility import u
|
||||
from jedi import Script
|
||||
from jedi import api
|
||||
from jedi import common
|
||||
from jedi.evaluate import imports
|
||||
from jedi.parser import ParserWithRecovery, load_grammar
|
||||
|
||||
@@ -179,6 +180,15 @@ class TestRegression(TestCase):
|
||||
else:
|
||||
assert n == limit
|
||||
|
||||
def test_source_to_unicode_unicode_text(self):
|
||||
source = (
|
||||
b"# vim: fileencoding=utf-8\n"
|
||||
b"# \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\n"
|
||||
)
|
||||
actual = common.source_to_unicode(source)
|
||||
expected = source.decode('utf-8')
|
||||
assert actual == expected
|
||||
|
||||
|
||||
def test_loading_unicode_files_with_bad_global_charset(monkeypatch, tmpdir):
|
||||
dirname = str(tmpdir.mkdir('jedi-test'))
|
||||
|
||||
Reference in New Issue
Block a user