Пример #1
0
 def testDoublePartial(self):
   _ReturnArgs2 = functools.partial(_ReturnArgs, 1, x=2)
   _ReturnArgs3 = functools.partial(_ReturnArgs2, 3, x=4)
   result = vm_util._GetCallString((_ReturnArgs3, (), {}))
   self.assertEqual(result, '_ReturnArgs(1, 3, x=4)')
   result = vm_util._GetCallString((_ReturnArgs3, ('blue', 5), {'x': 8}))
   self.assertEqual(result, '_ReturnArgs(1, 3, blue, 5, x=8)')
Пример #2
0
 def testDoublePartial(self):
   _ReturnArgs2 = functools.partial(_ReturnArgs, 1, x=2)
   _ReturnArgs3 = functools.partial(_ReturnArgs2, 3, x=4)
   result = vm_util._GetCallString((_ReturnArgs3, (), {}))
   self.assertEqual(result, '_ReturnArgs(1, 3, x=4)')
   result = vm_util._GetCallString((_ReturnArgs3, ('blue', 5), {'x': 8}))
   self.assertEqual(result, '_ReturnArgs(1, 3, blue, 5, x=8)')
Пример #3
0
 def testArgsAndKwargs(self):
   result = vm_util._GetCallString((_ReturnArgs, ('blue', 5), {'x': 8}))
   self.assertEqual(result, '_ReturnArgs(blue, 5, x=8)')
Пример #4
0
 def testKwargs(self):
   result = vm_util._GetCallString((_ReturnArgs, (), {'x': 8}))
   self.assertEqual(result, '_ReturnArgs(x=8)')
Пример #5
0
 def testNoArgs(self):
   result = vm_util._GetCallString((_ReturnArgs, (), {}))
   self.assertEqual(result, '_ReturnArgs()')
Пример #6
0
 def testArgsAndKwargs(self):
   result = vm_util._GetCallString((_ReturnArgs, ('blue', 5), {'x': 8}))
   self.assertEqual(result, '_ReturnArgs(blue, 5, x=8)')
Пример #7
0
 def testKwargs(self):
   result = vm_util._GetCallString((_ReturnArgs, (), {'x': 8}))
   self.assertEqual(result, '_ReturnArgs(x=8)')
Пример #8
0
 def testNoArgs(self):
   result = vm_util._GetCallString((_ReturnArgs, (), {}))
   self.assertEqual(result, '_ReturnArgs()')