project tree:
. |-- bar.py `-- test |-- __init__.py `-- test_bar.py
bar.py:
def dumb_true(): return True
Tests / test _bar.py:
import bar def test_bar_true(): assert bar.dumb_true()
I can run nosetests from within the project or its test directory. However, if I add an empty __init__.py to the project folder, I can no longer run nosetests from the test directory, which makes no sense to me.
. |-- bar.py |-- __init__.py <-- new, empty file, ruining everything `-- test |-- __init__.py `-- test_bar.py
Can someone explain to me what is going on here?
I read this topic extensively - through the nose documentation / reference pages and all over the Internet; but it seems very confusing to me how all this decides!
source share