Beispiel #1
0
 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)
Beispiel #2
0
 def test_path_collide_flat():
     args = ("Kind", 1)
     kwargs = {"flat": ("OtherKind", "Cheese")}
     with pytest.raises(TypeError):
         key_module._constructor_handle_positional(args, kwargs)
Beispiel #3
0
 def test_dict_positional():
     args = ({"flat": ("OtherKind", "Cheese"), "app": "ehp"}, )
     kwargs = {}
     key_module._constructor_handle_positional(args, kwargs)
     assert kwargs == args[0]
Beispiel #4
0
 def test_with_path():
     args = ("Kind", 1)
     kwargs = {}
     key_module._constructor_handle_positional(args, kwargs)
     assert kwargs == {"flat": args}
Beispiel #5
0
 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)
Beispiel #6
0
 def test_dict_positional():
     args = ({"flat": ("OtherKind", "Cheese"), "app": "ehp"},)
     kwargs = {}
     key_module._constructor_handle_positional(args, kwargs)
     assert kwargs == args[0]
Beispiel #7
0
 def test_path_collide_flat():
     args = ("Kind", 1)
     kwargs = {"flat": ("OtherKind", "Cheese")}
     with pytest.raises(TypeError):
         key_module._constructor_handle_positional(args, kwargs)
Beispiel #8
0
 def test_with_path():
     args = ("Kind", 1)
     kwargs = {}
     key_module._constructor_handle_positional(args, kwargs)
     assert kwargs == {"flat": args}