This repository has been archived by the owner on Jun 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
81 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ notest | |
pycontribs | ||
pypa | ||
setuptools | ||
typer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
pyyaml | ||
rich | ||
typer-config | ||
typing-extensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
pytest | ||
pytest>=7.0 | ||
coverage>=7.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ jobs: | |
with: | ||
min_python: "3.10" | ||
max_python: "3.12" | ||
default_python: "3.10" | ||
other_names: | | ||
lint | ||
pkg | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
repos: | ||
- ansible/ansible-compat | ||
- ansible/ansible-lint | ||
- ansible/ansible-navigator | ||
- ansible/ansible-creator | ||
- ansible/molecule | ||
- ansible/tox-ansible | ||
- ansible/pytest-ansible | ||
- ansible/ansible-development-environment | ||
- ansible/ansible-dev-tools | ||
- ansible/creator-ee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
"""Tests""" | ||
from pytest import CaptureFixture | ||
from gh_pre.__main__ import main | ||
from typer.testing import CliRunner | ||
|
||
__author__ = "Sorin Sbarnea" | ||
__copyright__ = "Sorin Sbarnea" | ||
__license__ = "MIT" | ||
from gh_pre.__main__ import app | ||
|
||
|
||
def test_main(capsys: CaptureFixture[str]) -> None: | ||
runner = CliRunner() | ||
|
||
|
||
def test_main() -> None: | ||
"""CLI Tests""" | ||
# capsys is a pytest fixture that allows asserts against stdout/stderr | ||
# https://docs.pytest.org/en/stable/capture.html | ||
main() | ||
captured = capsys.readouterr() | ||
assert "The 7-th Fibonacci number is 13" in captured.out | ||
result = runner.invoke(app, ["--help", "--config=tests/pre.yml"]) | ||
assert result.exit_code == 0, result.stdout | ||
assert "Pre helps you chain releases on github." in result.stdout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters