예제 #1
0
파일: test_funky.py 프로젝트: jml/funky
 def test_globals_as_parameters(self):
     def f(x):
         return x + a
     self.assertEqual(5, call_with_globals({'a': 3}, f, 2))
예제 #2
0
    def test_globals_as_parameters(self):
        def f(x):
            return x + a

        self.assertEqual(5, call_with_globals({'a': 3}, f, 2))
예제 #3
0
파일: test_funky.py 프로젝트: jml/funky
 def test_no_globals(self):
     def f(x):
         return x
     self.assertEqual(42, call_with_globals({}, f, 42))
예제 #4
0
    def test_no_globals(self):
        def f(x):
            return x

        self.assertEqual(42, call_with_globals({}, f, 42))