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

Skip to content

Commit 462f45f

Browse files
committed
Add --with-coverage and --detailed-error-msg flags to TestCommand
1 parent d6b175a commit 462f45f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

setup.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ class NoseTestCommand(TestCommand):
134134
("nose-verbose", None, "be verbose (nosetests)"),
135135
("processes=", None, "number of processes (nosetests)"),
136136
("process-timeout=", None, "process timeout (nosetests)"),
137+
("with-coverage", None, "with coverage"),
138+
("detailed-error-msg", None, "detailed error message (nosetest)"),
137139
]
138140

139141
def initialize_options(self):
@@ -145,6 +147,8 @@ def initialize_options(self):
145147
self.process_timeout = None
146148
self.nose_verbose = None
147149
self.nocapture = None
150+
self.with_coverage = None
151+
self.detailed_error_msg = None
148152

149153
def finalize_options(self):
150154
self.test_args = []
@@ -175,6 +179,12 @@ def finalize_options(self):
175179
if self.nocapture:
176180
self.test_args.append("--nocapture")
177181

182+
if self.with_coverage:
183+
self.test_args.append("--with-coverage")
184+
185+
if self.detailed_error_msg:
186+
self.test_args.append("-d")
187+
178188
def run(self):
179189
if self.distribution.install_requires:
180190
self.distribution.fetch_build_eggs(

0 commit comments

Comments
 (0)