Run pycodestyle over the codebase.
(self)
| 62 | self.assertGreaterEqual(score, 9.95, 'Found Pylint score regression') |
| 63 | |
| 64 | def test_pycodestyle(self): |
| 65 | ''' |
| 66 | Run pycodestyle over the codebase. |
| 67 | ''' |
| 68 | style = pycodestyle.StyleGuide() |
| 69 | |
| 70 | # Write the Pycodestyle log |
| 71 | with open('pycodestyle.log', 'w', encoding='utf-8') as handle: |
| 72 | # Redirect stdout to file so we can capture output |
| 73 | old_stdout = sys.stdout |
| 74 | sys.stdout = handle |
| 75 | |
| 76 | result = style.check_files(['./Test']) |
| 77 | |
| 78 | # Restore stdout |
| 79 | sys.stdout = old_stdout |
| 80 | |
| 81 | self.assertEqual(result.total_errors, 0, |
| 82 | 'Found pycodestyle warnings or errors.') |
| 83 | |
| 84 | def test_mypy(self): |
| 85 | ''' |
nothing calls this directly
no outgoing calls
no test coverage detected