Merged in dgilcrease/change-defaults-from-a-tuple-to-a-list-1412285169250 (pull request #1)

change the defaults from a tuple to a list so I can use config.addinivalue_line("norecursedirs", "...") to append new options in my own plugins
This commit is contained in:
Dj Gilcrease 2014-10-02 14:33:48 -07:00
commit 5ec1dd2609
2 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@ name_re = re.compile("^[a-zA-Z_]\w*$")
def pytest_addoption(parser):
parser.addini("norecursedirs", "directory patterns to avoid for recursion",
type="args", default=('.*', 'CVS', '_darcs', '{arch}', '*.egg'))
type="args", default=['.*', 'CVS', '_darcs', '{arch}', '*.egg'])
#parser.addini("dirpatterns",
# "patterns specifying possible locations of test files",
# type="linelist", default=["**/test_*.txt",

View File

@ -124,11 +124,11 @@ def pytest_addoption(parser):
parser.addini("usefixtures", type="args", default=[],
help="list of default fixtures to be used with this project")
parser.addini("python_files", type="args",
default=('test_*.py', '*_test.py'),
default=['test_*.py', '*_test.py'],
help="glob-style file patterns for Python test module discovery")
parser.addini("python_classes", type="args", default=("Test",),
parser.addini("python_classes", type="args", default=["Test",],
help="prefixes for Python test class discovery")
parser.addini("python_functions", type="args", default=("test",),
parser.addini("python_functions", type="args", default=["test",],
help="prefixes for Python test function and method discovery")
def pytest_cmdline_main(config):