def test_no_injection(self): injector = Injector(test="A") call = injector.wrap(lambda test: test + test + test) self.assertEqual(call(test="B"), "BBB")
def test_injection_kwargs_only(self): injector = Injector(test="A") call = injector.wrap(lambda *, test: test + test + test) self.assertEqual(call(), "AAA")
def test_injection(self): injector = Injector(test="A") call = injector.wrap(lambda test: test + test + test) self.assertEqual(call(), "AAA")