I have the following directory structure:
main/
|setup.cfg
|foo.cfg
|tests/
|setup.cfg
|foo.cfg
|test_simple.py
And test test_simple.py
:
from nose.tools import *
from nose.config import all_config_files, user_config_files
def test_singe():
print 'all:', all_config_files()
print 'user:', user_config_files()
assert_true(False)
From main/
I run nosetests tests/test_simple.py
and I get:
all: ['setup.cfg']
user: []
I thought either all_config_files
or user_config_files
will return all configuration files. But I get only the top setup.cfg
.
According to the docs:
all_config_files()
Return path to any existing user config files, plus any setup.cfg
in the current working directory.
user_config_files()
Return path to any existing user config files
I would expect files main/tests/*.cfg
to be found. What is wrong?