Skip to content

test(distros): Convert test_hosts.py from unittest to pytest#6481

Merged
aciba90 merged 1 commit into
canonical:mainfrom
GautamThorani:pytest-hosts-migration
Sep 23, 2025
Merged

test(distros): Convert test_hosts.py from unittest to pytest#6481
aciba90 merged 1 commit into
canonical:mainfrom
GautamThorani:pytest-hosts-migration

Conversation

@GautamThorani
Copy link
Copy Markdown
Contributor

Refactored tests/unittests/distros/test_hosts.py to use pytest instead of unittest.TestCase as part of the pytest migration effort.

  • Removed TestCase inheritance
  • Converted self.assert* methods to bare assert statements
  • Maintained all original test functionality

Related: #6427

Refactored tests/unittests/distros/test_hosts.py to use pytest instead of
unittest.TestCase as part of the pytest migration effort.

- Removed TestCase inheritance
- Converted self.assert* methods to bare assert statements
- Maintained all original test functionality

Related: canonical#6427
Copy link
Copy Markdown
Contributor

@aciba90 aciba90 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@aciba90 aciba90 merged commit 016abc0 into canonical:main Sep 23, 2025
21 checks passed
@GautamThorani GautamThorani deleted the pytest-hosts-migration branch October 11, 2025 21:07
blackboxsw pushed a commit to blackboxsw/cloud-init that referenced this pull request Nov 17, 2025
…al#6481)

Refactored tests/unittests/distros/test_hosts.py to use pytest instead of
unittest.TestCase as part of the pytest migration effort.

- Removed TestCase inheritance
- Converted self.assert* methods to bare assert statements
- Maintained all original test functionality

Related: canonical#6427
blackboxsw pushed a commit to blackboxsw/cloud-init that referenced this pull request Dec 3, 2025
…al#6481)

Refactored tests/unittests/distros/test_hosts.py to use pytest instead of
unittest.TestCase as part of the pytest migration effort.

- Removed TestCase inheritance
- Converted self.assert* methods to bare assert statements
- Maintained all original test functionality

Related: canonical#6427
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