| Conditions | 5 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # pyre-strict |
||
| 18 | def test_strict_all_python_files(self) -> None: |
||
| 19 | """ |
||
| 20 | Check that all relevant Python files have Pyre set to strict mode. |
||
| 21 | """ |
||
| 22 | for directory, _directories, files in os.walk('.'): |
||
| 23 | for file in files: |
||
| 24 | path = os.path.join(directory, file) |
||
| 25 | |||
| 26 | if self.path_can_safely_be_skipped(path): |
||
| 27 | continue |
||
| 28 | |||
| 29 | with open(path) as current_file: |
||
| 30 | first_line: str = current_file.readline() |
||
| 31 | |||
| 32 | self.assertEqual( |
||
| 33 | first_line, |
||
| 34 | '# pyre-strict\n', |
||
| 35 | path + ' is not set to Pyre strict mode.', |
||
| 36 | ) |
||
| 59 |