summaryrefslogtreecommitdiff
path: root/tests/util.py
diff options
context:
space:
mode:
authorScott Maxwell <scott@codecobblers.com>2013-10-30 16:22:52 -0700
committerScott Maxwell <scott@codecobblers.com>2013-10-30 16:22:52 -0700
commit644c52266caaa5b975a13e355d1bfd921c9c9ddb (patch)
treed6525a0626c82cb34256b678ae3fbbe145916a57 /tests/util.py
parent66cfa97cce92b1d60383d178887b18dddb999fc1 (diff)
downloadparamiko-644c52266caaa5b975a13e355d1bfd921c9c9ddb.tar.gz
Use test_path to avoid relative path issues
Diffstat (limited to 'tests/util.py')
-rw-r--r--tests/util.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/util.py b/tests/util.py
index 1b380b75..66d2696c 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -1,6 +1,8 @@
import os
import unittest
+root_path = os.path.dirname(os.path.realpath(__file__))
+
class ParamikoTest(unittest.TestCase):
# for Python 2.3 and below
@@ -9,3 +11,7 @@ class ParamikoTest(unittest.TestCase):
if not hasattr(unittest.TestCase, 'assertFalse'):
assertFalse = unittest.TestCase.failIf
+
+def test_path(filename):
+ return os.path.join(root_path, filename)
+