Added pep8 style tests

This commit is contained in:
Luke Else 2024-01-21 21:58:45 +00:00
parent cd88926475
commit f227727c74
3 changed files with 11 additions and 1 deletions

View File

@ -5,4 +5,4 @@ pytest:
# - python -m venv .venv
# - source /bin/activate
- pip install -r requirements.txt
- pytest
- pytest --disable-warnings

View File

@ -23,3 +23,4 @@ ujson==5.8.0
virtualenv==20.24.6
waitress==2.1.2
Werkzeug==3.0.1
pycodestyle==2.11.1

View File

@ -0,0 +1,9 @@
import pycodestyle
# Tests files to ensure they conform to pep8 standards
def test_pep8_conformance():
"""Test that we conform to PEP8."""
pep8style = pycodestyle.StyleGuide()
dirs = ["./controllers", "./models", "./scripts", "./tests"]
result = pep8style.check_files(dirs)
assert result.total_errors == 0