summaryrefslogtreecommitdiff
path: root/tests/functional/features/environment.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-24 22:31:35 -0400
committerKali Kaneko <kali@leap.se>2017-08-30 16:18:48 -0400
commit8ba14779884b2d1913de1ae4abf6fdeea130838a (patch)
tree26cba3be6ea5be35afb4fe84c60f10ca752b4437 /tests/functional/features/environment.py
parent598c9823f514f42e42edc62b785178777e928a73 (diff)
[tests] workaround some errors while running tests
Diffstat (limited to 'tests/functional/features/environment.py')
-rw-r--r--tests/functional/features/environment.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/functional/features/environment.py b/tests/functional/features/environment.py
index 5b179cd5..c92a39d0 100644
--- a/tests/functional/features/environment.py
+++ b/tests/functional/features/environment.py
@@ -1,12 +1,14 @@
+import commands
import os
+import sys
import shutil
import re
-import time
+
from urlparse import urlparse
-import commands
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
+
from leap.common.config import get_path_prefix
DEFAULT_IMPLICIT_WAIT_TIMEOUT_IN_S = 10
@@ -102,7 +104,10 @@ def _save_screenshot(context, step):
def _save_config(context, step):
filepath = _artifact_path(step, 'config')
- shutil.copytree(get_path_prefix(), filepath)
+ try:
+ shutil.copytree(get_path_prefix(), filepath)
+ except OSError:
+ pass
print('copied config to: file://%s' % filepath)