Browse Source

Trying to figure out how to release sqlite

Oz N Tiram 8 years ago
parent
commit
730d9d47fe
3 changed files with 4 additions and 2 deletions
  1. 0 1
      pwman/data/factory.py
  2. 1 1
      tests/test_init.py
  3. 3 0
      tests/test_tools.py

+ 0 - 1
pwman/data/factory.py

@@ -77,7 +77,6 @@ def check_db_version(dburi):
 def createdb(dburi, version):
 
     dburi = urlparse(dburi)
-    print("dburi : {}".format(dburi))
     dbtype = dburi.scheme
     try:
         cls = getattr(drivers, create_db_map[dbtype][0])

+ 1 - 1
tests/test_init.py

@@ -73,6 +73,7 @@ class TestInit(unittest.TestCase):
         self.tester.create()
 
     def tearDown(self):
+        del(self.tester)
         os.unlink(self.db._filename)
 
     def test_get_db_version(self):
@@ -80,7 +81,6 @@ class TestInit(unittest.TestCase):
         self.assertEqual(v, u"'0.6'")
         v = get_db_version(self.tester.configp, 'sqlite')
         self.assertEqual(v, u"'0.6'")
-        #os.unlink(testdb)
 
     def test_set_xsel(self):
         Args = namedtuple('args', 'cfile, dbase, algo')

+ 3 - 0
tests/test_tools.py

@@ -137,3 +137,6 @@ class SetupTester(object):
         db = factory.createdb(self.dburi, self.dbver)
         self.cli = PwmanCliNew(db, self.xselpath, DummyCallback,
                                config_parser=self.configp)
+
+    def __del__(self):
+        self.cli.do_exit("")