From f1d6252d8b6e5d1171456e8fde46507b53c6c230 Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Wed, 22 Mar 2017 19:49:55 -0700 Subject: [PATCH] Add pyfa path to python paths (cherry picked from commit dd51c38) --- tests/test_modules/gui/test_aboutData.py | 9 ++++----- tests/test_modules/service/test_attribute.py | 8 +++----- tests/test_smoketests/test_rifter.py | 10 ++++++++-- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/tests/test_modules/gui/test_aboutData.py b/tests/test_modules/gui/test_aboutData.py index e54901201..bbb296686 100644 --- a/tests/test_modules/gui/test_aboutData.py +++ b/tests/test_modules/gui/test_aboutData.py @@ -1,11 +1,10 @@ +# Add root folder to python paths +# This must be done on every test in order to pass in Travis import os import sys - -''' script_dir = os.path.dirname(os.path.abspath(__file__)) -# Add root folder to python paths -sys.path.append(os.path.realpath(os.path.join(script_dir, '..', '..'))) -''' +sys.path.append(os.path.realpath(os.path.join(script_dir, '..', '..', '..'))) + from gui.aboutData import versionString, licenses, developers, credits, description diff --git a/tests/test_modules/service/test_attribute.py b/tests/test_modules/service/test_attribute.py index 25eedc51a..219fe53b2 100644 --- a/tests/test_modules/service/test_attribute.py +++ b/tests/test_modules/service/test_attribute.py @@ -1,11 +1,9 @@ +# Add root folder to python paths +# This must be done on every test in order to pass in Travis import os import sys - -''' script_dir = os.path.dirname(os.path.abspath(__file__)) -# Add root folder to python paths -sys.path.append(os.path.realpath(os.path.join(script_dir, '..', '..'))) -''' +sys.path.append(os.path.realpath(os.path.join(script_dir, '..', '..', '..'))) from service.attribute import Attribute diff --git a/tests/test_smoketests/test_rifter.py b/tests/test_smoketests/test_rifter.py index 339d00e3a..050098be8 100644 --- a/tests/test_smoketests/test_rifter.py +++ b/tests/test_smoketests/test_rifter.py @@ -1,7 +1,13 @@ -# noinspection PyPackageRequirements - import pytest +# Add root folder to python paths +# This must be done on every test in order to pass in Travis +import os +import sys +script_dir = os.path.dirname(os.path.abspath(__file__)) +sys.path.append(os.path.realpath(os.path.join(script_dir, '..', '..'))) + +# noinspection PyPackageRequirements from _development.helpers import DBInMemory as DB, Gamedata, Saveddata