def test_dict_positional_with_other_kwargs(): args = ({"flat": ("OtherKind", "Cheese"), "app": "ehp"}, ) kwargs = {"namespace": "over-here"} with pytest.raises(TypeError): key_module._constructor_handle_positional(args, kwargs)
def test_path_collide_flat(): args = ("Kind", 1) kwargs = {"flat": ("OtherKind", "Cheese")} with pytest.raises(TypeError): key_module._constructor_handle_positional(args, kwargs)
def test_dict_positional(): args = ({"flat": ("OtherKind", "Cheese"), "app": "ehp"}, ) kwargs = {} key_module._constructor_handle_positional(args, kwargs) assert kwargs == args[0]
def test_with_path(): args = ("Kind", 1) kwargs = {} key_module._constructor_handle_positional(args, kwargs) assert kwargs == {"flat": args}
def test_dict_positional_with_other_kwargs(): args = ({"flat": ("OtherKind", "Cheese"), "app": "ehp"},) kwargs = {"namespace": "over-here"} with pytest.raises(TypeError): key_module._constructor_handle_positional(args, kwargs)
def test_dict_positional(): args = ({"flat": ("OtherKind", "Cheese"), "app": "ehp"},) kwargs = {} key_module._constructor_handle_positional(args, kwargs) assert kwargs == args[0]