Use common doctest_dropdb
review2151002
This commit is contained in:
1 parent
4dc7a144e7
commit
9da5c5b86b
1 file changed
+1
-15
+1
-15
@@ -17,8 +17,7 @@ from dateutil.relativedelta import relativedelta
|
||||
from functools import partial
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, test_view,\
|
||||
test_depends
|
||||
from trytond.backend.sqlite.database import Database as SQLiteDatabase
|
||||
test_depends, doctest_dropdb
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
|
||||
@@ -622,19 +621,6 @@ class StockTestCase(unittest.TestCase):
|
||||
self.assertRaises(Exception, self.period.close, [period])
|
||||
|
||||
|
||||
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()
|
||||
from trytond.modules.company.tests import test_company
|
||||
|
||||
Reference in new issue
Block a user