예제 #1
0
 def test_match_list_current_contains_more(self):
     assert not state.state_match(['a', 'b', 1], ['a', 'b', 'c', 1])
예제 #2
0
 def test_match_indentical_set(self):
     assert state.state_match(set(['a', 'b', 1]), set(['a', 'b', 1]))
     assert state.state_match(set(['a', 1, 'b']), set(['a', 'b', 1]))
     assert state.state_match(set(['a', 1, 1, 'b']), set(['a', 'b', 1]))
예제 #3
0
 def test_match_list_identical(self):
     assert state.state_match(['a', 'b', 1], ['a', 'b', 1])
예제 #4
0
 def test_match_list_different_order(self):
     assert not state.state_match(['a', 'b', 1], ['a', 1, 'b'])
예제 #5
0
 def test_match_dict_different_value_type(self):
     assert not state.state_match({'a': 1, 'b': []}, {'a': 1, 'b': 2})
예제 #6
0
 def test_match_dict_desire_has_more_data(self):
     assert not state.state_match({'a': 1, 'b': 2}, {'a': 1})
예제 #7
0
 def test_match_dict_current_has_more_data(self):
     assert state.state_match({'a': 1}, {'a': 1, 'b': 2})
예제 #8
0
 def test_match_dict_identical(self):
     assert state.state_match({'a': 1, 'b': 2}, {'a': 1, 'b': 2})
예제 #9
0
 def test_match_list_vs_string(self):
     assert not state.state_match(['a', 'b', 'c'], 'abc')