Skip to content

test(cli): migrate tests from unittest to pytest#2075

Open
LittleK-513 wants to merge 1 commit into
opsdroid:mainfrom
LittleK-513:main
Open

test(cli): migrate tests from unittest to pytest#2075
LittleK-513 wants to merge 1 commit into
opsdroid:mainfrom
LittleK-513:main

Conversation

@LittleK-513
Copy link
Copy Markdown

This PR migrates tests/test_cli.py to opsdroid/cli/tests/test_cli.py following the pytest migration guidelines from #1502.

Changes:

  • Remove unittest.TestCase class structure
  • Convert setUp to autouse fixture (configure_lang)
  • Replace tearDown with pytest tmpdir handling
  • Convert self.assertX to pytest assert statements
  • Add docstrings to all tests and fixtures
  • Move from top-level tests/ to opsdroid/cli/tests/

Tested locally:

  • pytest opsdroid/cli/tests/test_cli.py passes

Refs #1502

Migrate tests/test_cli.py to opsdroid/cli/tests/test_cli.py following
the pytest migration guidelines from issue opsdroid#1502.

Changes:
- Remove unittest.TestCase class structure
- Convert setUp to autouse fixture (configure_lang)
- Replace tearDown with pytest tmpdir handling
- Convert self.assertX to pytest assert statements
- Add docstrings to all tests and fixtures
- Move from top-level tests/ to opsdroid/cli/tests/

Refs opsdroid#1502
@github-actions github-actions Bot added the tests label May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant