Commit 34029657 authored by Mouadh's avatar Mouadh

tox tests fix

parent 892e6892
...@@ -17,7 +17,6 @@ from ..tools.connection import MyDB ...@@ -17,7 +17,6 @@ from ..tools.connection import MyDB
RUNNING_TOX = 'RUNTING_TOX' in os.environ RUNNING_TOX = 'RUNTING_TOX' in os.environ
class MdxEngine: class MdxEngine:
""" """
The principal class for executing a query The principal class for executing a query
...@@ -75,14 +74,12 @@ class MdxEngine: ...@@ -75,14 +74,12 @@ class MdxEngine:
''' '''
# get csv files folders (cubes) # get csv files folders (cubes)
# toxworkdir does not expanduser properly
if RUNNING_TOX: if RUNNING_TOX:
location = os.path.join( home_directory = os.environ.get('HOME_DIR')
os.path.abspath(
os.path.join(
os.path.dirname(__file__), "..", "..", "..", "..")),
MdxEngine.CUBE_FOLDER)
else: else:
home_directory = expanduser("~") home_directory = expanduser("~")
location = os.path.join(home_directory, 'olapy-data', location = os.path.join(home_directory, 'olapy-data',
cls.CUBE_FOLDER) cls.CUBE_FOLDER)
...@@ -113,13 +110,10 @@ class MdxEngine: ...@@ -113,13 +110,10 @@ class MdxEngine:
def _get_default_cube_directory(self): def _get_default_cube_directory(self):
if RUNNING_TOX: if RUNNING_TOX:
return os.path.join( home_directory = os.environ.get('HOME_DIR')
os.path.abspath(
os.path.join(
os.path.dirname(__file__), "..", "..", "..", "..")),
MdxEngine.CUBE_FOLDER)
else: else:
home_directory = expanduser("~") home_directory = expanduser("~")
return os.path.join(home_directory, 'olapy-data', self.cube_folder) return os.path.join(home_directory, 'olapy-data', self.cube_folder)
def _get_tables_name(self): def _get_tables_name(self):
......
...@@ -5,6 +5,7 @@ envlist = py27 ...@@ -5,6 +5,7 @@ envlist = py27
[testenv] [testenv]
setenv= setenv=
RUNTING_TOX=true RUNTING_TOX=true
HOME_DIR = {homedir}
whitelist_externals= whitelist_externals=
make make
commands= commands=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment