Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_terminate_instead_close(self):
''' make terminate() instead of close()
'''
d = sqlitedict.open('tests/db/sqlitedict-terminate.sqlite')
d['abc'] = 'def'
d.commit()
self.assertEqual(d['abc'], 'def')
d.terminate()
self.assertFalse(os.path.isfile('tests/db/sqlitedict-terminate.sqlite'))
def test_terminate_instead_close(self):
''' make terminate() instead of close()
'''
d = sqlitedict.open('tests/db/sqlitedict-terminate.sqlite')
d['abc'] = 'def'
d.commit()
self.assertEqual(d['abc'], 'def')
d.terminate()
self.assertFalse(os.path.isfile('tests/db/sqlitedict-terminate.sqlite'))