def test_dict_ne(self): letters = {'a': 'A', 'b': 'B', 'c': 'C'} operand = {'a': 'A', 'b': 'B'} ne_pred = jp.DICT_NE(operand) self.assertGood(letters, ne_pred) self.assertBad(operand, ne_pred) self.assertGood({'a': 'A'}, ne_pred)
def test_dict_ne(self): letters = {'a': 'A', 'b': 'B', 'c': 'C'} operand = {'a': 'A', 'b': 'B'} ne_pred = jp.DICT_NE(operand) self.assertGoodResult(PathValue('', letters), ne_pred, ne_pred(letters)) self.assertBadResult(PathValue('', operand), ne_pred, ne_pred(operand)) self.assertGoodResult(PathValue('', {'a': 'A'}), ne_pred, ne_pred({'a': 'A'}))
def test_dict_ne(self): context = ExecutionContext() letters = {'a':'A', 'b':'B', 'c':'C'} operand = {'a': 'A', 'b': 'B'} ne_pred = jp.DICT_NE(operand) self.assertGoodResult(PathValue('', letters), ne_pred, ne_pred(context, letters)) self.assertBadResult(PathValue('', operand), ne_pred, ne_pred(context, operand)) self.assertGoodResult(PathValue('', {'a': 'A'}), ne_pred, ne_pred(context, {'a': 'A'}))