-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
type: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
Description
Originally reported by: holger krekel (BitBucket: hpk42, GitHub: hpk42)
Discussed with @jurko and others: It would be good to have a conftestscan ini variable which you can set in order to have pytest scan for conftest files. Examples:
conftestscan = test*/conftest.py(the default) would make pytest look for aconftest.pyin any sub directory of the directory containing the ini-file.conftestscan = test*/**/conftest.pywould make pytest do a recursive search in all subdirs.conftestscan = myproj/**/conftest.pywould make pytest scan all subdirs in the project/package directory forconftest.pyfiles.
Note that the only effect of conftestscan is to load conftest files early and make e.g. its command line options available. Any fixture functions or e.g. pytest_runtest_* hooks would still only be available to all the tests under the directory of the respective conftest.py file where they are defined. In other words, conftestscan does not turn conftest.py into global plugins.
Metadata
Metadata
Assignees
Labels
type: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch