Python sqlite3.threadsafety() Examples

The following are 13 code examples of sqlite3.threadsafety(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module sqlite3 , or try the search function .
Example #1
Source File: test_sync_store.py    From chia-blockchain with Apache License 2.0 6 votes vote down vote up
def test_basic_store(self):
        assert sqlite3.threadsafety == 1
        blocks = bt.get_consecutive_blocks(test_constants, 9, [], 9, b"0")
        blocks_alt = bt.get_consecutive_blocks(test_constants, 3, [], 9, b"1")
        db = await SyncStore.create()
        db_2 = await SyncStore.create()

        # Save/get sync
        for sync_mode in (False, True):
            db.set_sync_mode(sync_mode)
            assert sync_mode == db.get_sync_mode()
        genesis = FullBlock.from_bytes(test_constants["GENESIS_BLOCK"])

        # clear sync info
        await db.clear_sync_info()

        # add/get potential tip, get potential tips num
        db.add_potential_tip(blocks[6])
        assert blocks[6] == db.get_potential_tip(blocks[6].header_hash) 
Example #2
Source File: dbapi.py    From vsphere-storage-for-docker with Apache License 2.0 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety) 
Example #3
Source File: dbapi.py    From ironpython2 with Apache License 2.0 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety) 
Example #4
Source File: dbapi.py    From BinderFilter with MIT License 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety) 
Example #5
Source File: dbapi.py    From oss-ftp with MIT License 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety) 
Example #6
Source File: dbapi.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety) 
Example #7
Source File: dbapi.py    From Imogen with MIT License 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety) 
Example #8
Source File: dbapi.py    From ironpython3 with Apache License 2.0 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety) 
Example #9
Source File: dbapi.py    From datafari with Apache License 2.0 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety) 
Example #10
Source File: dbapi.py    From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety) 
Example #11
Source File: dbapi.py    From odoo13-x64 with GNU General Public License v3.0 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety) 
Example #12
Source File: api_tests.py    From conary with Apache License 2.0 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         'threadsafety is %d, should be 1' % sqlite.threadsafety) 
Example #13
Source File: dbapi.py    From android_universal with MIT License 5 votes vote down vote up
def CheckThreadSafety(self):
        self.assertEqual(sqlite.threadsafety, 1,
                         "threadsafety is %d, should be 1" % sqlite.threadsafety)