Add a test that verifies ruff, black, and mypy all pass
This fels good! Topic: clean_rewrite
This commit is contained in:
parent
dc4e2d8d64
commit
6a5f572374
|
@ -0,0 +1,24 @@
|
|||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
from .test_case import TestCase
|
||||
|
||||
|
||||
class LinterTest(TestCase):
|
||||
"""
|
||||
Test that ruff, black, and mypy run cleanly.
|
||||
"""
|
||||
|
||||
HOME = Path(__file__).parent.parent
|
||||
|
||||
def test_ruff(self) -> None:
|
||||
code = subprocess.check_call(["ruff", str(self.HOME)])
|
||||
self.assertEqual(code, 0)
|
||||
|
||||
def test_black(self) -> None:
|
||||
code = subprocess.check_call(["black", "--check", str(self.HOME)])
|
||||
self.assertEqual(code, 0)
|
||||
|
||||
def test_mypy(self) -> None:
|
||||
code = subprocess.check_call(["mypy", str(self.HOME)])
|
||||
self.assertEqual(code, 0)
|
Loading…
Reference in New Issue