예제 #1
0
 def test_property_gets_overloaded_value(self):
     l = [1, 2, 3]
     g = Gauge()
     g.get_value = lambda: len(l)
     self.assertEqual(g.value, 3)
예제 #2
0
 def test_gets_value(self):
     g = Gauge()
     g.value = 42
     self.assertEqual(g.get_value(), 42)