Skip to content

Run tests from Ada CLI#16

Merged
PenguinBoi12 merged 1 commit intomainfrom
test-command
May 2, 2026
Merged

Run tests from Ada CLI#16
PenguinBoi12 merged 1 commit intomainfrom
test-command

Conversation

@PenguinBoi12
Copy link
Copy Markdown
Collaborator

@PenguinBoi12 PenguinBoi12 commented May 2, 2026

Adds an ada test command that runs black, mypy and pytest with formatted pass/fail output per step.

Example:
success

$ ada test
black   checking formatting...  ✓
mypy    type checking...  ✓
pytest  running tests...  ✓

failing

$ ada test
black   checking formatting...  ✓
mypy    type checking...  ✓
pytest  running tests...  ✗
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0
rootdir: /home/penguinboi/Projects/ada
configfile: pyproject.toml
plugins: cov-7.1.0, asyncio-1.3.0
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 18 items

tests/extensions/test_welcome_extension.py .F....                        [ 33%]
tests/test_config.py ........                                            [ 77%]
tests/test_loader.py ....                                                [100%]

=================================== FAILURES ===================================
__________________ test_is_new_join_false_when_already_joined __________________

    def test_is_new_join_false_when_already_joined() -> None:
        event = SimpleNamespace(membership="join", prev_membership="join")
>       assert _is_new_join(event) is True
E       AssertionError: assert False is True
E        +  where False = _is_new_join(namespace(membership='join', prev_membership='join'))

tests/extensions/test_welcome_extension.py:40: AssertionError
=========================== short test summary info ============================
FAILED tests/extensions/test_welcome_extension.py::test_is_new_join_false_when_already_joined - AssertionError: assert False is True
========================= 1 failed, 17 passed in 0.31s =========================

# Conflicts:
#	bot/cli.py
Copy link
Copy Markdown
Contributor

@chrisdedman chrisdedman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. LTGM

@PenguinBoi12 PenguinBoi12 merged commit d695c29 into main May 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants