diff options
-rw-r--r-- | dovetail/report.py | 2 | ||||
-rw-r--r-- | dovetail/tests/unit/test_report.py | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/dovetail/report.py b/dovetail/report.py index 09cfdcea..65c41484 100644 --- a/dovetail/report.py +++ b/dovetail/report.py @@ -597,7 +597,7 @@ class FunctestChecker(object): match = find_reg.findall(tc) if match: return True - reg = sub_testcase.rsplit('.', 1)[0] + reg = sub_testcase.rsplit('.', 1)[0] + '$' find_reg = re.compile(reg) for tc in result: match = find_reg.findall(tc) diff --git a/dovetail/tests/unit/test_report.py b/dovetail/tests/unit/test_report.py index 2dcb44e4..4840f2b5 100644 --- a/dovetail/tests/unit/test_report.py +++ b/dovetail/tests/unit/test_report.py @@ -1382,8 +1382,15 @@ class ReportTesting(unittest.TestCase): def test_functest_get_sub_testcase_class_match(self): self.assertEquals( True, - dt_report.FunctestChecker.get_sub_testcase('subclass_a', - ['subclass_a.subt_a', + dt_report.FunctestChecker.get_sub_testcase('subclass_a.subt_a', + ['subclass_a', + 'subclass_b.subt_b'])) + + def test_functest_get_sub_testcase_class_no_match(self): + self.assertEquals( + False, + dt_report.FunctestChecker.get_sub_testcase('subclass_a.subt_a', + ['subclass_a.subt_a_a', 'subclass_b.subt_b'])) def test_functest_get_sub_no_match(self): |