From 26227cfe53f8fd4bc1631d8e1b35031f589682dc Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 15 Jan 2012 15:55:19 +0100 Subject: backend + api test case, nicer format for plugin tester --- module/InitHomeDir.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'module/InitHomeDir.py') diff --git a/module/InitHomeDir.py b/module/InitHomeDir.py index 156c9f932..ff1e1463b 100644 --- a/module/InitHomeDir.py +++ b/module/InitHomeDir.py @@ -63,6 +63,9 @@ if "--configdir=" in args: configdir = args[pos + 12:].strip() else: configdir = args[pos + 12:end].strip() +elif "nosetests" in args or "nosetests2" in args: + configdir = join(pypath, "tests", "config") + elif path.exists(path.join(pypath, "module", "config", "configdir")): f = open(path.join(pypath, "module", "config", "configdir"), "rb") c = f.read().strip() -- cgit v1.2.3 From d75c8d8793dde827977828ee1b6a9dc3256aa439 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 15 Jan 2012 19:33:43 +0100 Subject: config directory fix --- module/InitHomeDir.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/InitHomeDir.py') diff --git a/module/InitHomeDir.py b/module/InitHomeDir.py index ff1e1463b..14207847e 100644 --- a/module/InitHomeDir.py +++ b/module/InitHomeDir.py @@ -52,7 +52,7 @@ else: __builtin__.homedir = homedir -args = " ".join(argv[1:]) +args = " ".join(argv) # dirty method to set configdir from commandline arguments if "--configdir=" in args: @@ -63,7 +63,8 @@ if "--configdir=" in args: configdir = args[pos + 12:].strip() else: configdir = args[pos + 12:end].strip() -elif "nosetests" in args or "nosetests2" in args: +elif "nosetests" in args: + print "Running in test mode" configdir = join(pypath, "tests", "config") elif path.exists(path.join(pypath, "module", "config", "configdir")): -- cgit v1.2.3