diff --git a/test/test_api/test_unicode.py b/test/test_api/test_unicode.py index ede5757d..c74cb686 100644 --- a/test/test_api/test_unicode.py +++ b/test/test_api/test_unicode.py @@ -65,10 +65,10 @@ def test_complete_at_zero(Script): assert len(s) > 0 -def test_wrong_encoding(Script, cwd_tmpdir): - x = cwd_tmpdir.join('x.py') +def test_wrong_encoding(Script, tmpdir): + x = tmpdir.join('x.py') # 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')) - c, = Script('import x; x.foo', sys_path=['.']).completions() + c, = Script('import x; x.foo', sys_path=[tmpdir.strpath]).completions() assert c.name == 'foobar'