summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVadim Rutkovsky <vrutkovs@redhat.com>2014-07-28 20:11:18 +0200
committerVadim Rutkovsky <vrutkovs@redhat.com>2014-07-28 20:11:18 +0200
commit511f0a7ab95ea7425ea4702512203e5147d4e093 (patch)
tree7bcb76df6e7595c8f32d991c8b1d1fb1daaeda39 /tests
parentc950a6c5205c88b817f021dc73ee82ce78f6b526 (diff)
downloadeog-511f0a7ab95ea7425ea4702512203e5147d4e093.tar.gz
tests: trap exceptions in before_tag
Diffstat (limited to 'tests')
-rw-r--r--tests/environment.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/environment.py b/tests/environment.py
index 08abbfae..2c30f487 100644
--- a/tests/environment.py
+++ b/tests/environment.py
@@ -30,11 +30,14 @@ def before_all(context):
def before_tag(context, tag):
- # Copy screenshots
- if tag == 'screenshot':
- context.save_screenshots = True
- context.screenshot_dir = "../eog_screenshots"
- makedirs(context.screenshot_dir)
+ try:
+ # Copy screenshots
+ if 'screenshot' in tag:
+ context.save_screenshots = True
+ context.screenshot_dir = "../eog_screenshots"
+ makedirs(context.screenshot_dir)
+ except Exception as e:
+ print("Error in before_tag: %s" % str(e))
def after_step(context, step):