Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: pytestify "tests/unittests/config/test_cc_timezone.py" #5885

Merged
merged 7 commits into from
Nov 19, 2024

Conversation

MaheshG11
Copy link
Contributor

Proposed Commit Message

test: pytestify "tests/unittests/config/test_cc_timezone.py"

Refactors the code in the file "tests/unittests/config/test_cc_timezone.py" 
using pytest. This helps remove dependance of this test on 
"tests/unittests/helpers.py:FileSystemMockingTestCase"

Fixes: part of GH-5760

Additional Context

This change removes the dependance of the test on FileSystemMockingTestCase and replaces it with fakefilesystem, a pytest fixture located in "tests/unittest/conftest".

Fixes: part of #5760

Test Steps

  1. Run pytest tests/unittests/config/test_cc_timezone.py in main repository

Merge type

Copy link
Member

@holmanb holmanb left a comment

Choose a reason for hiding this comment

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

Thanks for this change @MaheshG11! I requested one small change inline, but otherwise this looks good.

tests/unittests/config/test_cc_timezone.py Show resolved Hide resolved
Copy link
Member

@holmanb holmanb left a comment

Choose a reason for hiding this comment

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

Thanks @MaheshG11! This looks good to me.

@holmanb holmanb merged commit 3c24560 into canonical:main Nov 19, 2024
22 checks passed
mathmarchand pushed a commit to mathmarchand/cloud-init-onb1204 that referenced this pull request Nov 29, 2024
…al#5885)

Refactors the code in the file "tests/unittests/config/test_cc_timezone.py" 
using pytest. This helps remove dependance of this test on 
"tests/unittests/helpers.py:FileSystemMockingTestCase"

Fixes: part of canonicalGH-5760
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