Fix discover_test get_skills_dir()
The discover_test didn't handle configurable data path correctly.
@@ -16,7 +16,7 @@ import pytest
import glob
import os
-from os.path import exists
+from os.path import exists, join, expanduser
import sys
import imp
@@ -64,8 +64,10 @@ def discover_tests(skills_dir):
def get_skills_dir():
if len(sys.argv) > 1:
- return sys.argv[1]
- return Configuration.get()['skills']['msm']['directory']
+ return expanduser(sys.argv[-1])
+
+ return expanduser(join(Configuration.get()['data_dir'],
+ Configuration.get()['skills']['msm']['directory']))
skills_dir = get_skills_dir()
