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