From fd2572a39d13c276a3ac770a81e38be72ba51a10 Mon Sep 17 00:00:00 2001 From: Dj Gilcrease Date: Thu, 2 Oct 2014 21:27:19 +0000 Subject: [PATCH 1/3] 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 --HG-- branch : dgilcrease/change-defaults-from-a-tuple-to-a-list-1412285169250 --- _pytest/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/main.py b/_pytest/main.py index 2d46c56e8..66b951185 100644 --- a/_pytest/main.py +++ b/_pytest/main.py @@ -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", From 2f141bbc54aed08982fe31584fc95ac1794d92be Mon Sep 17 00:00:00 2001 From: Dj Gilcrease Date: Thu, 2 Oct 2014 21:32:35 +0000 Subject: [PATCH 2/3] change the defaults from a tuple to a list so I can use config.addinivalue_line("python_files", "...") to append new options in my own plugins --HG-- branch : dgilcrease/change-defaults-from-a-tuple-to-a-list-1412285169250 --- _pytest/python.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_pytest/python.py b/_pytest/python.py index 9ce1d2170..dc0e5ac3d 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -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):