incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1447257 - /incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/tests/__init__.py
Date Mon, 18 Feb 2013 13:51:05 GMT
Author: jure
Date: Mon Feb 18 13:51:05 2013
New Revision: 1447257

URL: http://svn.apache.org/r1447257
Log:
#355, skip modules without __init__.py in test discovery, patch t355_r1446579_discovery_skip_no_init.diff
applied (from Olemis)


Modified:
    incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/tests/__init__.py

Modified: incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/tests/__init__.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/tests/__init__.py?rev=1447257&r1=1447256&r2=1447257&view=diff
==============================================================================
--- incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/tests/__init__.py
(original)
+++ incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/tests/__init__.py
Mon Feb 18 13:51:05 2013
@@ -50,7 +50,11 @@ class TestLoader(unittest.TestLoader):
         tests = []
         while pending:
             mdlnm, loader, isdir = pending.popleft()
-            mdl = self._get_module_from_name(mdlnm)
+            try:
+                mdl = self._get_module_from_name(mdlnm)
+            except ImportError:
+                # Skip packages not having __init__.py
+                continue
             loader = getattr(mdl, self.testLoaderAttribute, None) or loader
             if mdlnm != package_or_requirement and hasattr(mdl, 'test_suite'):
                 tests.append(mdl.test_suite())



Mime
View raw message