2024-08-13 18:12:30 +01:00
|
|
|
import pytest
|
|
|
|
import sys
|
|
|
|
from flake8.main.application import Application
|
|
|
|
|
|
|
|
# Run flake
|
|
|
|
app = Application()
|
2024-08-14 22:42:53 +01:00
|
|
|
ret = app.run(["--max-line-length", "120", "matchy/", "tests/"])
|
2024-08-13 18:12:30 +01:00
|
|
|
flake_exitcode = app.exit_code()
|
|
|
|
print(flake_exitcode)
|
|
|
|
|
|
|
|
# Run pytest
|
|
|
|
pytest_exitcode = pytest.main()
|
|
|
|
|
|
|
|
# Exit based on the two codes
|
|
|
|
sys.exit(flake_exitcode + pytest_exitcode)
|