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