Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

        def check_results(res, expected, allow_question_mark=False):
    def check_triplets(tr, te):
        sr, pr, orr = tr.split()
        se, pe, oe = te.split()

        if not allow_question_mark and \
                ('?' in se or '?' in sr):
            return False

        return (sr == se or se == '*') and \
               (pr == pe or pe == '*') and \
               (orr == oe or oe == '*')

    while res:
        r = res.pop()
        for e in expected:
            if check_triplets(r, e):
                expected.remove(e)
    if expected:
        logger.info("\t**** /Missing statements in result:   ")
        logger.info("\t" + str(expected) + "\n")

    return expected == res
        


src/d/i/Dialogs-0.13/src/dialogs/interpretation/discrimination_test.py   Dialogs(Download)
from dialogs.dialog_exceptions import *
 
from dialogs.helpers.helpers import check_results, get_console_handler, get_file_handler
 
 
 
        self.assertEquals(res[0], expected_result[0])
        self.assertTrue(check_results(res[1], expected_result[1], allow_question_mark=True))
 
 
 
        self.assertEquals(res[0], expected_result[0])
        self.assertTrue(check_results(res[1], expected_result[1], allow_question_mark=True))
 
 
 
        self.assertEquals(res[0], expected_result[0])
        self.assertTrue(check_results(res[1], expected_result[1], allow_question_mark=True))
 
 

src/d/i/Dialogs-0.13/src/dialogs/interpretation/statements_builder_test.py   Dialogs(Download)
from dialogs.resources_manager import ResourcePool
 
from dialogs.helpers.helpers import check_results, get_console_handler, get_file_handler
 
from dialogs.dialog_core import Dialog