mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Get rid of a cwd to tmpdir, because with the subprocess it doesn't behave the same depending on which tests you run first
This commit is contained in:
@@ -65,10 +65,10 @@ def test_complete_at_zero(Script):
|
|||||||
assert len(s) > 0
|
assert len(s) > 0
|
||||||
|
|
||||||
|
|
||||||
def test_wrong_encoding(Script, cwd_tmpdir):
|
def test_wrong_encoding(Script, tmpdir):
|
||||||
x = cwd_tmpdir.join('x.py')
|
x = tmpdir.join('x.py')
|
||||||
# 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(u'foobar = 1\nä'.encode('latin-1') + u'ä'.encode('utf-8'))
|
x.write_binary(u'foobar = 1\nä'.encode('latin-1') + u'ä'.encode('utf-8'))
|
||||||
|
|
||||||
c, = Script('import x; x.foo', sys_path=['.']).completions()
|
c, = Script('import x; x.foo', sys_path=[tmpdir.strpath]).completions()
|
||||||
assert c.name == 'foobar'
|
assert c.name == 'foobar'
|
||||||
|
|||||||
Reference in New Issue
Block a user