Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8bb973b

Browse files
committed
add tests parameter to the setup.py
1 parent e137bf0 commit 8bb973b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ class NoseTestCommand(TestCommand):
136136
("process-timeout=", None, "process timeout (nosetests)"),
137137
("with-coverage", None, "with coverage"),
138138
("detailed-error-msg", None, "detailed error message (nosetest)"),
139+
("tests=", None, "comma separated selection of tests (nosetest)"),
139140
]
140141

141142
def initialize_options(self):
@@ -149,6 +150,7 @@ def initialize_options(self):
149150
self.nocapture = None
150151
self.with_coverage = None
151152
self.detailed_error_msg = None
153+
self.tests = None
152154

153155
def finalize_options(self):
154156
self.test_args = []
@@ -185,6 +187,10 @@ def finalize_options(self):
185187
if self.detailed_error_msg:
186188
self.test_args.append("-d")
187189

190+
if self.tests:
191+
self.test_args.append("--tests={names}".format(names=self.tests))
192+
193+
188194
def run(self):
189195
if self.distribution.install_requires:
190196
self.distribution.fetch_build_eggs(

0 commit comments

Comments
 (0)