Skip to content

Commit

Permalink
tests.linting - use acacore.__file__ as linting path
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Jun 19, 2024
1 parent bc7bda5 commit a8fd6a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/linting.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import subprocess
from pathlib import Path

from acacore import __file__ as acacore_init_file


def test_black(test_folder: Path):
completed_process = subprocess.run(
["poetry", "run", "black", "--check", str(test_folder.parent)],
["poetry", "run", "black", "--check", str(Path(acacore_init_file).parent)],
check=False,
)
assert completed_process.returncode == 0


def test_ruff(test_folder: Path):
completed_process = subprocess.run(
["poetry", "run", "ruff", "check", str(test_folder.parent)],
["poetry", "run", "ruff", "check", str(Path(acacore_init_file).parent)],
check=False,
)
assert completed_process.returncode == 0

0 comments on commit a8fd6a6

Please sign in to comment.