def test_create_autospec_keyword_only_arguments(self):

    def foo(a, *, b=None):
        pass
    m = create_autospec(foo)
    m(1)
    m.assert_called_with(1)
    self.assertRaises(TypeError, m, 1, 2)
    m(2, b=3)
    m.assert_called_with(2, b=3)
def test_create_autospec_keyword_only_arguments(self):

    def foo(a, *, b=None):
        pass
    m = create_autospec(foo)
    m(1)
    m.assert_called_with(1)
    self.assertRaises(TypeError, m, 1, 2)
    m(2, b=3)
    m.assert_called_with(2, b=3)