Determines if the given filename has a suffix that identifies it as a test. Args: filename: The input filename. Returns: True if 'filename' looks like a test, False otherwise.
(filename)
| 3605 | |
| 3606 | |
| 3607 | def _IsTestFilename(filename): |
| 3608 | """Determines if the given filename has a suffix that identifies it as a test. |
| 3609 | |
| 3610 | Args: |
| 3611 | filename: The input filename. |
| 3612 | |
| 3613 | Returns: |
| 3614 | True if 'filename' looks like a test, False otherwise. |
| 3615 | """ |
| 3616 | if (filename.endswith('_test.cc') or |
| 3617 | filename.endswith('_unittest.cc') or |
| 3618 | filename.endswith('_regtest.cc')): |
| 3619 | return True |
| 3620 | else: |
| 3621 | return False |
| 3622 | |
| 3623 | |
| 3624 | def _ClassifyInclude(fileinfo, include, is_system): |