Example #1
0
 def test__cmp__(self):
     from shove.core import MultiShove
     tstore = MultiShove()
     self.store['max'] = 3
     tstore['max'] = 3
     self.store.sync()
     tstore.sync()
     self.assertEqual(self.store, tstore)
Example #2
0
 def test__cmp__(self):
     from shove.core import MultiShove
     tstore = MultiShove()
     self.store['max'] = 3
     tstore['max'] = 3
     self.store.sync()
     tstore.sync()
     self.assertEqual(self.store, tstore)
class TestMultiShove(Multi, unittest.TestCase):

    stores = (
        'simple://', 'dbm://one.dbm', 'memory://', 'file://two', 'sqlite://',
    )

    def setUp(self):
        from shove.core import MultiShove
        self.store = MultiShove(*self.stores, sync=0)

    def tearDown(self):
        import os
        import shutil
        self.store.close()
        shutil.rmtree('two')
        try:
            os.remove('one.dbm')
        except OSError:
            os.remove('one.dbm.db')
Example #4
0
 def test_update(self):
     from shove.core import MultiShove
     tstore = MultiShove()
     tstore['max'] = 3
     tstore['min'] = 6
     tstore['pow'] = 7
     self.store['max'] = 2
     self.store['min'] = 3
     self.store['pow'] = 7
     self.store.update(tstore)
     self.store.sync()
     self.assertEqual(self.store['min'], 6)
Example #5
0
 def setUp(self):
     from shove.core import MultiShove
     self.store = MultiShove(*self.stores, sync=0)
Example #6
0
 def setUp(self):
     from shove.core import MultiShove
     self.store = MultiShove(*self.stores, sync=0)
Example #7
0
 def setUp(self):
     from shove.core import MultiShove
     from stuf.six import pickle
     self.store = MultiShove(*self.stores, sync=0)