Allow files for get_default_project, fixes #1552

This commit is contained in:
Dave Halter
2020-04-26 00:33:04 +02:00
parent 97fb95ec0c
commit 7fd5c8af8f
3 changed files with 16 additions and 1 deletions

View File

@@ -20,6 +20,12 @@ def test_django_default_project(Script):
assert script._inference_state.project._django is True
def test_django_default_project_of_file(Script):
project = get_default_project(__file__)
d = os.path.dirname
assert project._path == d(d(d(__file__)))
def test_interpreter_project_path():
# Run from anywhere it should be the cwd.
dir = os.path.join(root_dir, 'test')