summaryrefslogtreecommitdiff
path: root/src/distutils2/command
diff options
context:
space:
mode:
authorKonrad Delong <konryd@gmail.com>2010-07-27 15:06:44 +0200
committerKonrad Delong <konryd@gmail.com>2010-07-27 15:06:44 +0200
commit6b554ce70cd2e6b7a6e0633100de6cb533e46d46 (patch)
tree86c0cf2249571b3db5f2735d8f1542a8ee0853e5 /src/distutils2/command
parent462f1aa669f88e31a24fbb67329718e267cb7672 (diff)
downloaddisutils2-6b554ce70cd2e6b7a6e0633100de6cb533e46d46.tar.gz
emitting warnings instead of installing distributions from option
Diffstat (limited to 'src/distutils2/command')
-rw-r--r--src/distutils2/command/test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/distutils2/command/test.py b/src/distutils2/command/test.py
index 043f22c..8bbaac2 100644
--- a/src/distutils2/command/test.py
+++ b/src/distutils2/command/test.py
@@ -1,6 +1,8 @@
import os, sys
from distutils2.core import Command
+from distutils2._backport.pkgutil import get_distribution
import unittest
+import warnings
def get_loader_instance(dotted_path):
if dotted_path is None:
@@ -38,6 +40,11 @@ class test(Command):
def finalize_options(self):
self.build_lib = self.get_finalized_command("build").build_lib
+ if self.distribution.tests_require:
+ for requirement in self.distribution.tests_require:
+ if get_distribution(requirement) is None:
+ warnings.warn("The test dependency %s is not installed which may couse the tests to fail.",
+ RuntimeWarning)
def run(self):
prev_cwd = os.getcwd()