summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Thenault <sylvain.thenault@logilab.fr>2008-12-02 12:51:11 +0100
committerSylvain Thenault <sylvain.thenault@logilab.fr>2008-12-02 12:51:11 +0100
commit555e64b15c9783ceb563a0c1bc3f08543f1cde5c (patch)
tree0f97493f742c6bb2fe5b934402dbe95eea798707
parent906eaeaca20b5dc9b2b4a59bce2793f9875fc6cc (diff)
downloadlogilab-common-555e64b15c9783ceb563a0c1bc3f08543f1cde5c.tar.gz
self.options is None when test are run using python instead of pytest
-rw-r--r--testlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testlib.py b/testlib.py
index 4271839..462ed68 100644
--- a/testlib.py
+++ b/testlib.py
@@ -850,8 +850,8 @@ Examples:
el._testMethodName))
if descr in succTests:
obj.remove(el)
-
- if self.options.restart:
+ # take care, self.options may be None
+ if getattr(self.options, 'restart', False):
# retrieve succeeded tests from FILE_RESTART
try:
restartfile = open(FILE_RESTART, 'r')