-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Remove unittest #2044
base: main
Are you sure you want to change the base?
Remove unittest #2044
Conversation
Linting fails because of an unused var |
@@ -46,7 +45,7 @@ def parameterize(): | |||
shutil.rmtree(tmp_dir) | |||
|
|||
|
|||
class TestFeedstockIO(unittest.TestCase): | |||
class TestFeedstockIO: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit test executes the setup method before tests. If we simply remove the class inheritance here, I am not sure if that will happen or not given the code now. Can we convert the setup to a test fixture and the methods to functions?
|
||
if repo is not None: | ||
blob = next(repo.index.iter_blobs(BlobFilter(filename2)))[1] | ||
read_text = blob.data_stream[3].read().decode("utf-8") | ||
|
||
self.assertEqual(write_text, read_text) | ||
assert write_text == read_text | ||
|
||
def tearDown(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comment applies to teardown. This should be part of a test fixture IIUIC.
@@ -532,18 +532,18 @@ def test_v1_cbc_osx_hints( | |||
assert any(lint.startswith(exp_lint) for lint in lints) | |||
|
|||
|
|||
class TestLinter(unittest.TestCase): | |||
class TestLinter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The methods on this class should be converted to pure functions.
Hello 👋!
As part of the STF work for Conda, this PR introduces several improvements to our testing framework by transitioning from
unittest
topytest
and leveragingpytest-mock
for mocking.It is split up from #1975.
Thank you!
Checklist