Esempio n. 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))
Esempio n. 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))
Esempio n. 3
0
 def test_posoargs_end_missing_raises(self):
     func = f('')
     self.assertRaises(ValueError, modifiers.posoargs(end='a'), func)
Esempio n. 4
0
 def test_posoargs_noop(self):
     func = f('')
     self.assertTrue(func is modifiers.posoargs()(func))
Esempio n. 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))
Esempio n. 6
0
 def test_posoargs_end_missing_raises(self):
     func = f('')
     self.assertRaises(ValueError, modifiers.posoargs(end='a'), func)
Esempio n. 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))
Esempio n. 8
0
 def test_posoargs_noop(self):
     func = f('')
     self.assertTrue(func is modifiers.posoargs()(func))