aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/test.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-10-10 20:03:33 -0400
committerJason R. Coombs <jaraco@jaraco.com>2015-10-10 20:03:33 -0400
commita33e201d1a86dd108e8641f641ff24c7f00ba054 (patch)
treeb97cfba1858c5f55fa729e544c3661e9f8787c54 /setuptools/command/test.py
parent0a30d49169f5e73c86f452f284d10ed4b1646ff4 (diff)
downloadexternal_python_setuptools-a33e201d1a86dd108e8641f641ff24c7f00ba054.tar.gz
external_python_setuptools-a33e201d1a86dd108e8641f641ff24c7f00ba054.tar.bz2
external_python_setuptools-a33e201d1a86dd108e8641f641ff24c7f00ba054.zip
Move value checking into its own block.
Diffstat (limited to 'setuptools/command/test.py')
-rw-r--r--setuptools/command/test.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index a80d91ad..4d859808 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -62,15 +62,16 @@ class test(Command):
def finalize_options(self):
+ if self.test_suite and self.test_module:
+ raise DistutilsOptionError(
+ "You may specify a module or a suite, but not both"
+ )
+
if self.test_suite is None:
if self.test_module is None:
self.test_suite = self.distribution.test_suite
else:
self.test_suite = self.test_module + ".test_suite"
- elif self.test_module:
- raise DistutilsOptionError(
- "You may specify a module or a suite, but not both"
- )
if self.test_loader is None:
self.test_loader = getattr(self.distribution, 'test_loader', None)