From c3920ac537047734bbe71021037932d1484746d5 Mon Sep 17 00:00:00 2001 From: Dzhoshkun Ismail Shakir Date: Mon, 19 Nov 2018 08:46:25 +0000 Subject: [PATCH] Issue #18: fixed import statement in stereo tests --- src/tests/blackmagic/test_stereo.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/tests/blackmagic/test_stereo.py b/src/tests/blackmagic/test_stereo.py index 8d61520f..e9103f95 100644 --- a/src/tests/blackmagic/test_stereo.py +++ b/src/tests/blackmagic/test_stereo.py @@ -1,8 +1,15 @@ import time from pytest import mark -from utils import (StereoFrameConsistencyChecker, - StereoFrameNumpyCompatibilityChecker, - StereoFrameBackwardsCompatibilityChecker) +try: + # in case of PyPI installation, this will work: + from giftgrab.tests.utils import (StereoFrameConsistencyChecker, + StereoFrameNumpyCompatibilityChecker, + StereoFrameBackwardsCompatibilityChecker) +except ImportError: + # in case of installation from source, this will work: + from utils import (StereoFrameConsistencyChecker, + StereoFrameNumpyCompatibilityChecker, + StereoFrameBackwardsCompatibilityChecker) import pygiftgrab as pgg