Skip to content

Commit

Permalink
Add script to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fivegrant committed Sep 7, 2023
1 parent 193a5eb commit 906a932
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ pre-commit = "^3.3.3"


[tool.poetry.scripts]
status-test = "tests.report:test"
gen-report = "tests.report:report"

[tool.poe.tasks]
_test = "pytest --json-report --json-report-file=tests/output/tests.json"
_test = "status-test"
_report = "gen-report"
report = ["_test", "_report"]

Expand Down
5 changes: 5 additions & 0 deletions tests/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
from collections import defaultdict

import yaml
import pytest

def test(output_file="tests/output/tests.json"):
pytest.main(["--json-report", f"--json-report-file={output_file}"])


def report():
# TODO: Make this into a predefined struct
Expand Down

0 comments on commit 906a932

Please sign in to comment.