From fc315108f038f7af43d42908eb914ca7be614873 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 20 Jan 2018 21:56:56 +0100 Subject: [PATCH] Get rid of a cwd to tmpdir, because with the subprocess it doesn't behave the same depending on which tests you run first --- test/test_api/test_unicode.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'