Add local path

(cherry picked from commit c9c340d)
This commit is contained in:
Ebag333
2017-03-22 01:24:59 -07:00
parent 75df133071
commit 599b5318fc
2 changed files with 10 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ sys.path.append(os.path.realpath(os.path.join(script_dir, '..', '..')))
# noinspection PyUnresolvedReferences,PyUnusedLocal
@pytest.fixture
def DBInMemory():
print("Creating database in memory")
import eos.config
from os.path import realpath, join, dirname, abspath
@@ -39,6 +40,7 @@ def DBInMemory():
@pytest.fixture
def Gamedata():
print("Building Gamedata")
from eos.gamedata import Item
helper = {
@@ -49,6 +51,7 @@ def Gamedata():
@pytest.fixture
def Saveddata():
print("Building Saveddata")
from eos.saveddata.ship import Ship
from eos.saveddata.fit import Fit
from eos.saveddata.character import Character

View File

@@ -1,6 +1,13 @@
# noinspection PyPackageRequirements
import pytest
import os
import sys
script_dir = os.path.dirname(os.path.abspath(__file__))
# Add this folder to paths so we can import our helpers
sys.path.append(os.path.realpath(os.path.join(script_dir)))
# noinspection PyUnresolvedReferences
from helpers import DBInMemory as DB
# noinspection PyUnresolvedReferences