1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
7 from telemetry import decorators
14 def CreateFooUncached(_):
19 def CreateFooCached(_):
23 class DecoratorsUnitTest(unittest.TestCase):
25 def testCacheDecorator(self):
26 self.assertNotEquals(CreateFooUncached(1), CreateFooUncached(2))
27 self.assertNotEquals(CreateFooCached(1), CreateFooCached(2))
29 self.assertNotEquals(CreateFooUncached(1), CreateFooUncached(1))
30 self.assertEquals(CreateFooCached(1), CreateFooCached(1))