Commit 34029657 authored by Mouadh's avatar Mouadh

tox tests fix

parent 892e6892
......@@ -17,7 +17,6 @@ from ..tools.connection import MyDB
RUNNING_TOX = 'RUNTING_TOX' in os.environ
class MdxEngine:
"""
The principal class for executing a query
......@@ -75,14 +74,12 @@ class MdxEngine:
'''
# get csv files folders (cubes)
# toxworkdir does not expanduser properly
if RUNNING_TOX:
location = os.path.join(
os.path.abspath(
os.path.join(
os.path.dirname(__file__), "..", "..", "..", "..")),
MdxEngine.CUBE_FOLDER)
home_directory = os.environ.get('HOME_DIR')
else:
home_directory = expanduser("~")
location = os.path.join(home_directory, 'olapy-data',
cls.CUBE_FOLDER)
......@@ -113,13 +110,10 @@ class MdxEngine:
def _get_default_cube_directory(self):
if RUNNING_TOX:
return os.path.join(
os.path.abspath(
os.path.join(
os.path.dirname(__file__), "..", "..", "..", "..")),
MdxEngine.CUBE_FOLDER)
home_directory = os.environ.get('HOME_DIR')
else:
home_directory = expanduser("~")
return os.path.join(home_directory, 'olapy-data', self.cube_folder)
def _get_tables_name(self):
......
......@@ -5,6 +5,7 @@ envlist = py27
[testenv]
setenv=
RUNTING_TOX=true
HOME_DIR = {homedir}
whitelist_externals=
make
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