git://git.onelab.eu
/
tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d0d07a4
)
catch exceptions when trying to create test instances
author
Tony Mack
<tmack@cs.princeton.edu>
Mon, 11 Feb 2008 21:38:17 +0000
(21:38 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Mon, 11 Feb 2008 21:38:17 +0000
(21:38 +0000)
qaapi/qa/QAAPI.py
patch
|
blob
|
history
diff --git
a/qaapi/qa/QAAPI.py
b/qaapi/qa/QAAPI.py
index
6fe98a6
..
39ee19e
100644
(file)
--- a/
qaapi/qa/QAAPI.py
+++ b/
qaapi/qa/QAAPI.py
@@
-2,6
+2,7
@@
import sys, os
import traceback
import tests
from Config import Config
import traceback
import tests
from Config import Config
+from tests.Test import Test
from logger import log
class QAAPI:
from logger import log
class QAAPI:
@@
-95,12
+96,14
@@
class QAAPI:
try:
test = __import__(test_path, globals(), locals(), test_path)
callables = []
try:
test = __import__(test_path, globals(), locals(), test_path)
callables = []
-
for attribute in dir(test):
attr = getattr(test, attribute)
if callable(attr) and hasattr(attr, 'status'):
setattr(attr, 'test_name', test_basename+attribute)
for attribute in dir(test):
attr = getattr(test, attribute)
if callable(attr) and hasattr(attr, 'status'):
setattr(attr, 'test_name', test_basename+attribute)
- callables.append(attr(self.config))
+ try:
+ test_instance = attr(self.config)
+ callables.append(test_instance)
+ except: pass
return callables
except ImportError, AttributeError:
raise
return callables
except ImportError, AttributeError:
raise