diff --git a/tests/context.py b/tests/context.py
index 349ae8a25e3fb5661a378504b43fe8a159afa4cb..91de701e6098e869568eec74be08049170631ea1 100644
--- a/tests/context.py
+++ b/tests/context.py
@@ -2,6 +2,6 @@
 
 import sys
 import os
-sys.path.insert(0, os.path.abspath('..'))
+sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
 
-import sample
\ No newline at end of file
+import sample