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)
Esempio n. 2
0
    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'}))
Esempio n. 3
0
  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'}))