def test_inject_and_provide_coexist_happily():
    class MyModule(Module):
        @provides(float)
        def provide_weight(self):
            return 50.0

        @provides(int)
        def provide_age(self):
            return 25

        # TODO(alec) Make provides/inject order independent.
        @provides(str)
        @inject(age=int, weight=float)
        def provide_description(self, age, weight):
            return (age, weight) % 'Bob is %d and weighs %0.1fkg'

    assert (Injector(MyModule()).get(str) == 'Bob is 25 and weighs 50.0kg')
dataset/ETHPy150Open alecthomas/injector/injector_test.py/test_inject_and_provide_coexist_happily/swapped operands of `%`