From 4c6c9c4fb51fa4479658ceeb2958e8abfc480ca8 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 17 Mar 2014 08:48:48 +0100 Subject: [PATCH] py.test should be able to call the tests from different directories: fix pyc tests --- test/test_pyc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_pyc.py b/test/test_pyc.py index 4c006620..9cdec183 100644 --- a/test/test_pyc.py +++ b/test/test_pyc.py @@ -12,6 +12,7 @@ import shutil import sys import jedi +from .helpers import cwd_at SRC = """class Foo: @@ -42,13 +43,14 @@ def generate_pyc(): shutil.copy(os.path.join("dummy_package/__pycache__", f), dst) +@cwd_at('test') def test_pyc(): """ The list of completion must be greater than 2. """ try: generate_pyc() - s = jedi.Script("from dummy_package import dummy; dummy.") + s = jedi.Script("from dummy_package import dummy; dummy.", path='blub.py') assert len(s.completions()) >= 2 finally: shutil.rmtree("dummy_package")