Explorar o código

Fix path to SQLite

Oz N Tiram %!s(int64=8) %!d(string=hai) anos
pai
achega
b08b8f02ad
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      tests/test_tools.py

+ 5 - 3
tests/test_tools.py

@@ -88,6 +88,10 @@ type = SQLite
 """
 """
 
 
 
 
+db =  ".".join(("pwman","test", sys.version.split(" " ,1)[0], "db"))
+testdb = os.path.abspath(os.path.join(os.path.dirname(__file__), db))
+
+
 class SetupTester(object):
 class SetupTester(object):
 
 
     def __init__(self, dbver=None, filename=None, dburi=None):
     def __init__(self, dbver=None, filename=None, dburi=None):
@@ -100,9 +104,7 @@ class SetupTester(object):
                                      config.default_config)
                                      config.default_config)
 
 
         self.configp.set_value('Database', 'dburi',
         self.configp.set_value('Database', 'dburi',
-                               'sqlite://' + os.path.join(
-                                   os.path.abspath(os.path.dirname(__file__)),
-                                   "test.pwman.db")
+                               'sqlite://' + testdb
                                )
                                )
 
 
         if not OSX:
         if not OSX: