Beispiel #1
0
 def _test(self, expected_sig_str, orig_sig_str, end):
     orig_func = f(orig_sig_str)
     func = modifiers.posoargs(end=end)(orig_func)
     self.assertSigsEqual(s(expected_sig_str), signature(func))
Beispiel #2
0
 def test_merge_other(self):
     orig_func = f('a, b')
     func = modifiers.kwoargs('b')(modifiers.posoargs(end='a')(orig_func))
     self.assertSigsEqual(s('<a>, *, b'), signature(func))
Beispiel #3
0
 def test_posoargs_end_missing_raises(self):
     func = f('')
     self.assertRaises(ValueError, modifiers.posoargs(end='a'), func)
Beispiel #4
0
 def test_posoargs_noop(self):
     func = f('')
     self.assertTrue(func is modifiers.posoargs()(func))
Beispiel #5
0
 def _test(self, expected_sig_str, orig_sig_str, end):
     orig_func = f(orig_sig_str)
     func = modifiers.posoargs(end=end)(orig_func)
     self.assertSigsEqual(s(expected_sig_str), signature(func))
Beispiel #6
0
 def test_posoargs_end_missing_raises(self):
     func = f('')
     self.assertRaises(ValueError, modifiers.posoargs(end='a'), func)
Beispiel #7
0
 def test_merge_other(self):
     orig_func = f('a, b')
     func = modifiers.kwoargs('b')(modifiers.posoargs(end='a')(orig_func))
     self.assertSigsEqual(s('<a>, *, b'), signature(func))
Beispiel #8
0
 def test_posoargs_noop(self):
     func = f('')
     self.assertTrue(func is modifiers.posoargs()(func))