Use common doctest_dropdb
review2151002
This commit is contained in:
1 parent
323da769d5
commit
2aa1636fc5
1 file changed
+1
-15
@@ -11,8 +11,7 @@ if os.path.isdir(DIR):
|
||||
import unittest
|
||||
import doctest
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.tests.test_tryton import test_view, test_depends
|
||||
from trytond.backend.sqlite.database import Database as SQLiteDatabase
|
||||
from trytond.tests.test_tryton import test_view, test_depends, doctest_dropdb
|
||||
|
||||
|
||||
class SaleShipmentCostTestCase(unittest.TestCase):
|
||||
@@ -36,19 +35,6 @@ class SaleShipmentCostTestCase(unittest.TestCase):
|
||||
test_depends()
|
||||
|
||||
|
||||
def doctest_dropdb(test):
|
||||
'''
|
||||
Remove sqlite memory database
|
||||
'''
|
||||
database = SQLiteDatabase().connect()
|
||||
cursor = database.cursor(autocommit=True)
|
||||
try:
|
||||
database.drop(cursor, ':memory:')
|
||||
cursor.commit()
|
||||
finally:
|
||||
cursor.close()
|
||||
|
||||
|
||||
def suite():
|
||||
suite = trytond.tests.test_tryton.suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
|
||||
Reference in new issue
Block a user