  
      def test_decr_version(self):
          "Dummy cache versions can't be decremented"
          cache.set('answer', 42)
          self.assertRaises(ValueError, cache.decr_version, 'answer')
          self.assertRaises(ValueError, cache.decr_version, 'does_not_exist')
  
      def test_get_or_set(self):
          self.assertEqual(cache.get_or_set('mykey', 'default'), 'default')
  
      def test_get_or_set_callable(self):
 
</s> remove         self.assertRaises(ValueError, cache.incr_version, 'answer')
        self.assertRaises(ValueError, cache.incr_version, 'does_not_exist')
 </s> add         with self.assertRaises(ValueError):
            cache.incr_version('answer')
        with self.assertRaises(ValueError):
            cache.incr_version('does_not_exist') </s> remove         self.assertRaises(ValueError, cache.incr, 'answer')
        self.assertRaises(ValueError, cache.incr, 'does_not_exist')
 </s> add         with self.assertRaises(ValueError):
            cache.incr('answer')
        with self.assertRaises(ValueError):
            cache.incr('does_not_exist') </s> remove         self.assertRaises(ValueError, cache.decr, 'answer')
        self.assertRaises(ValueError, cache.decr, 'does_not_exist')
 </s> add         with self.assertRaises(ValueError):
            cache.decr('answer')
        with self.assertRaises(ValueError):
            cache.decr('does_not_exist') </s> remove         self.assertRaises(ValueError, cache.incr_version, 'does_not_exist')
 </s> add         with self.assertRaises(ValueError):
            cache.incr_version('does_not_exist') </s> remove         self.assertRaises(ValueError, cache.incr, 'does_not_exist')
 </s> add         with self.assertRaises(ValueError):
            cache.incr('does_not_exist')
        with self.assertRaises(ValueError):
            cache.decr_version('answer')
        with self.assertRaises(ValueError):
            cache.decr_version('does_not_exist')
  
      def test_decr_version(self):
          "Dummy cache versions can't be decremented"
          cache.set('answer', 42)
        with self.assertRaises(ValueError):
            cache.decr_version('answer')
        with self.assertRaises(ValueError):
            cache.decr_version('does_not_exist')
        with self.assertRaises(ValueError):
            cache.decr_version('answer')
        with self.assertRaises(ValueError):
            cache.decr_version('does_not_exist')
  
      def test_get_or_set(self):
          self.assertEqual(cache.get_or_set('mykey', 'default'), 'default')
  
      def test_get_or_set_callable(self):
keep keep keep keep replace replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/cache/tests.py