mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Fix a test that depended on correct cwd location an dnot having an x.py in a local directory
This commit is contained in:
@@ -64,6 +64,6 @@ def test_wrong_encoding(Script, tmpdir):
|
|||||||
# Use both latin-1 and utf-8 (a really broken file).
|
# Use both latin-1 and utf-8 (a really broken file).
|
||||||
x.write_binary('foobar = 1\nä'.encode('latin-1') + 'ä'.encode('utf-8'))
|
x.write_binary('foobar = 1\nä'.encode('latin-1') + 'ä'.encode('utf-8'))
|
||||||
|
|
||||||
project = Project('.', sys_path=[tmpdir.strpath])
|
project = Project(tmpdir.strpath)
|
||||||
c, = Script('import x; x.foo', project=project).complete()
|
c, = Script('import x; x.foo', project=project).complete()
|
||||||
assert c.name == 'foobar'
|
assert c.name == 'foobar'
|
||||||
|
|||||||
Reference in New Issue
Block a user