summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorRodolfo Carvalho <rhcarvalho@gmail.com>2017-02-18 17:46:08 +0100
committerRodolfo Carvalho <rhcarvalho@gmail.com>2017-02-20 17:13:52 +0100
commitc48a8d56d8d469465df5c44a7715062bf8c6f313 (patch)
tree2c77ab0cce7768b559f051da0344494104c349f8 /roles
parent731fdc43c9dc4f94860386c14b2ad383b77a24f0 (diff)
downloadopenshift-c48a8d56d8d469465df5c44a7715062bf8c6f313.tar.gz
openshift-c48a8d56d8d469465df5c44a7715062bf8c6f313.tar.bz2
openshift-c48a8d56d8d469465df5c44a7715062bf8c6f313.tar.xz
openshift-c48a8d56d8d469465df5c44a7715062bf8c6f313.zip
Insert paths in the second position of sys.path
http://stackoverflow.com/a/10097543/4804690 Additionally, avoid using platform-specific '/' and '..'.
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py2
-rw-r--r--roles/openshift_master_facts/test/openshift_master_facts_default_priorities_tests.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py b/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py
index 5013d1302..94c4495c9 100644
--- a/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py
+++ b/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py
@@ -5,7 +5,7 @@ import sys
from ansible.errors import AnsibleError
from nose.tools import raises, assert_equal
-sys.path = [os.path.abspath(os.path.dirname(__file__) + "/../lookup_plugins/")] + sys.path
+sys.path.insert(1, os.path.join(os.path.dirname(__file__), os.pardir, "lookup_plugins"))
from openshift_master_facts_default_predicates import LookupModule # noqa: E402
diff --git a/roles/openshift_master_facts/test/openshift_master_facts_default_priorities_tests.py b/roles/openshift_master_facts/test/openshift_master_facts_default_priorities_tests.py
index 7ddc5dcb2..0bcd240d6 100644
--- a/roles/openshift_master_facts/test/openshift_master_facts_default_priorities_tests.py
+++ b/roles/openshift_master_facts/test/openshift_master_facts_default_priorities_tests.py
@@ -5,7 +5,7 @@ import sys
from ansible.errors import AnsibleError
from nose.tools import raises, assert_equal
-sys.path = [os.path.abspath(os.path.dirname(__file__) + "/../lookup_plugins/")] + sys.path
+sys.path.insert(1, os.path.join(os.path.dirname(__file__), os.pardir, "lookup_plugins"))
from openshift_master_facts_default_priorities import LookupModule # noqa: E402