示例#1
0
 def test_five(self):
     smallcache.set_local(0, 7)
     smallcache.set_local(1, 0)
     smallcache.set_local(2, 5)
     smallcache.set_local(3, 1)
     smallcache.set_local(4, 4)
     self.assertIsNone(smallcache.get(0))
     self.assertEqual(smallcache.get(1), 0)
     self.assertEqual(smallcache.get(2), 5)
     self.assertEqual(smallcache.get(3), 1)
     self.assertEqual(smallcache.get(4), 4)
示例#2
0
 def test_five(self):
   smallcache.set_local(0, 7)
   smallcache.set_local(1, 0)
   smallcache.set_local(2, 5)
   smallcache.set_local(3, 1)
   smallcache.set_local(4, 4)
   self.assertIsNone(smallcache.get(0))
   self.assertEqual(smallcache.get(1), 0)
   self.assertEqual(smallcache.get(2), 5)
   self.assertEqual(smallcache.get(3), 1)
   self.assertEqual(smallcache.get(4), 4)
示例#3
0
 async def test_unset(self):
     smallcache.set_local(0, 7)
     await smallcache.unset_global(0)
     self.assertIsNone(smallcache.get(0))
示例#4
0
 def test_one(self):
     smallcache.set_local(0, 7)
     self.assertEqual(smallcache.get(0), 7)
示例#5
0
 async def test_unset(self):
   smallcache.set_local(0, 7)
   await smallcache.unset_global(0)
   self.assertIsNone(smallcache.get(0))
示例#6
0
 def test_one(self):
   smallcache.set_local(0, 7)
   self.assertEqual(smallcache.get(0), 7)