MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / test_pycodestyle

Method test_pycodestyle

Test/astc_test_python.py:64–82  ·  view source on GitHub ↗

Run pycodestyle over the codebase.

(self)

Source from the content-addressed store, hash-verified

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 '''

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected