move helpers functions out

(cherry picked from commit 2047d3f)
This commit is contained in:
Ebag333
2017-03-22 19:36:45 -07:00
parent 3ca181fce4
commit 38a7a50d1c
5 changed files with 21 additions and 15 deletions

0
_development/__init__.py Normal file
View File

View File

@@ -20,7 +20,7 @@ def DBInMemory():
gamedataCache = True
saveddataCache = True
gamedata_version = ""
eos.config.gamedata_connectionstring = 'sqlite:///' + realpath(join(dirname(abspath(unicode(__file__))), "..", "..", "eve.db"))
eos.config.gamedata_connectionstring = 'sqlite:///' + realpath(join(dirname(abspath(unicode(__file__))), "..", "eve.db"))
# saveddata_connectionstring = 'sqlite:///' + unicode(realpath(join(dirname(abspath(__file__)), "..", "saveddata", "saveddata.db")), sys.getfilesystemencoding())
eos.config.saveddata_connectionstring = 'sqlite:///:memory:'

View File

@@ -1,5 +1,13 @@
from gui.aboutData import versionString, licenses, developers, credits, description
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, '..', '..')))
'''
from gui.aboutData import versionString, licenses, developers, credits, description
def test_aboutData():
"""

View File

@@ -1,3 +1,12 @@
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, '..', '..')))
'''
from service.attribute import Attribute

View File

@@ -1,19 +1,8 @@
# 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
from helpers import Gamedata
# noinspection PyUnresolvedReferences
from helpers import Saveddata
from _development.helpers import DBInMemory as DB, Gamedata, Saveddata
# noinspection PyShadowingNames