def test_create_kwargs(self): kwargs = create_kwargs( MyClass, "MyClass", Params({"my_int": 5}), my_bool=True, my_float=4.4 ) # my_float should not be included because it's not a param of the MyClass constructor assert kwargs == {"my_int": 5, "my_bool": True}
def test_create_kwargs(self): kwargs = create_kwargs(MyClass, Params({'my_int': 5}), my_bool=True, my_float=4.4) # my_float should not be included because it's not a param of the MyClass constructor assert kwargs == { "my_int": 5, "my_bool": True }