From 505d114a68f18cd018e2f92a47b024370bd7dde3 Mon Sep 17 00:00:00 2001 From: Matteo Centenaro Date: Tue, 11 Jul 2017 22:57:37 +0200 Subject: Look for ini file to spot python project root (#755) * Look for ini file to spot project root When looking for the project root folder it would be better to check for some well-known init file instead of __init__.py. Indeed, with python3 it is now possible to have namespace modules where intermediate dirs are not required to include the __init__.py file. * Break if statement conditions over several lines * Add blank lines for the if block * Add test for FindProjectRoot * Typo: missing / for MANIFEST.in * Fix test for non-namespace package * Add more test cases --- .../python_paths/namespace_package_pytest/namespace/foo/__init__.py | 0 .../python_paths/namespace_package_pytest/namespace/foo/bar.py | 0 test/command_callback/python_paths/namespace_package_pytest/pytest.ini | 2 ++ 3 files changed, 2 insertions(+) create mode 100644 test/command_callback/python_paths/namespace_package_pytest/namespace/foo/__init__.py create mode 100644 test/command_callback/python_paths/namespace_package_pytest/namespace/foo/bar.py create mode 100644 test/command_callback/python_paths/namespace_package_pytest/pytest.ini (limited to 'test/command_callback/python_paths/namespace_package_pytest') diff --git a/test/command_callback/python_paths/namespace_package_pytest/namespace/foo/__init__.py b/test/command_callback/python_paths/namespace_package_pytest/namespace/foo/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/python_paths/namespace_package_pytest/namespace/foo/bar.py b/test/command_callback/python_paths/namespace_package_pytest/namespace/foo/bar.py new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/python_paths/namespace_package_pytest/pytest.ini b/test/command_callback/python_paths/namespace_package_pytest/pytest.ini new file mode 100644 index 00000000..1433c6c6 --- /dev/null +++ b/test/command_callback/python_paths/namespace_package_pytest/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +DJANGO_SETTINGS_MODULE=foo.settings -- cgit v1.2.3