Ejemplo n.º 1
0
 def test_empty_dictionary_is_injective(self):
     assert G.is_injective({})
Ejemplo n.º 2
0
 def test_two_keys_mapping_to_the_same_value(self):
     assert not G.is_injective({'a': 'c', 'b': 'c'})
Ejemplo n.º 3
0
 def test_dictionary_with_same_keys_and_values(self):
     assert G.is_injective({'a': 'b', 'b': 'a'})
Ejemplo n.º 4
0
 def test_identity(self):
     assert G.is_injective({'a': 'a'})
Ejemplo n.º 5
0
 def test_dictionary_with_different_keys_and_values(self):
     assert G.is_injective({'a': 'x', 'b': 'y'})