def get_testcases(self, include_onlymatching=False):
    t = getattr(self, '_TEST', None)
    if t:
        assert (not hasattr(self, '_TESTS')), ('%s has _TEST and _TESTS' % type(self).__name__)
        tests = [t]
    else:
        tests = getattr(self, '_TESTS', [])
    for t in tests:
        if ((not include_onlymatching) and t.get('only_matching', False)):
            continue
        t['name'] = type(self).__name__[:(- len('IE'))]
        (yield t)
def get_testcases(self, include_onlymatching=False):
    t = getattr(self, '_TEST', None)
    if t:
        assert (not hasattr(self, '_TESTS')), ('%s has _TEST and _TESTS' % type(self).__name__)
        tests = [t]
    else:
        tests = getattr(self, '_TESTS', [])
    for t in tests:
        if ((not include_onlymatching) and t.get('only_matching', False)):
            continue
        t['name'] = type(self).__name__[:(- len('IE'))]
        (yield t)