Exemplo n.º 1
0
 def testNoWrapperKwarg(self):
     results = SimpleResults(1)
     value = util.make_innermost_getter(lambda r, a: r.value + a)(results,
                                                                  a=1)
     self.assertEqual(2, value)
Exemplo n.º 2
0
 def testTwoWrappers(self):
     results = WrapperResults(inner_results=WrapperResults(
         inner_results=SimpleResults(1), value=2),
                              value=3)
     inner_results = util.make_innermost_getter(lambda r: r)(results)
     self.assertIs(inner_results, results.inner_results.inner_results)
Exemplo n.º 3
0
 def testNoWrapper(self):
     results = SimpleResults(1)
     inner_results = util.make_innermost_getter(lambda r: r)(results)
     self.assertIs(inner_results, results)