(type_, op, extracond="", func=None)
| 509 | |
| 510 | |
| 511 | def add_test_method(type_, op, extracond="", func=None): |
| 512 | global testn |
| 513 | # Decide to which set the test belongs. |
| 514 | heavy = type_ in heavy_types or op in heavy_operators |
| 515 | if heavy: |
| 516 | testfmt = TableDataTestCase._testfmt_heavy |
| 517 | else: |
| 518 | testfmt = TableDataTestCase._testfmt_light |
| 519 | tmethod = create_test_method(type_, op, extracond, func) |
| 520 | # The test number is appended to the docstring to help |
| 521 | # identify failing methods in non-verbose mode. |
| 522 | tmethod.__name__ = testfmt % testn |
| 523 | tmethod.__doc__ += testfmt % testn |
| 524 | setattr(TableDataTestCase, tmethod.__name__, tmethod) |
| 525 | testn += 1 |
| 526 | |
| 527 | |
| 528 | # Create individual tests. You may restrict which tests are generated |
no test coverage detected