Open
Conversation
for more information, see https://pre-commit.ci
atodorov
requested changes
Apr 21, 2026
Member
atodorov
left a comment
There was a problem hiding this comment.
Overall looks good, needs a few small changes.
| @@ -0,0 +1,129 @@ | |||
| # -*- coding: utf-8 -*- | |||
| # Copyright (c) 2024 | |||
Member
There was a problem hiding this comment.
Please use 2026 as the year and also add your name/email as the author. Feel free to add yourself to __init__.py as well.
| """Docstring harvested for test A must not be sent when test B runs.""" | ||
| item_a = _make_item("tests/test_foo.py::test_a", "Intention A") | ||
| item_b = _make_item("tests/test_foo.py::test_b", None) | ||
| item_b.function.__doc__ = None |
Member
There was a problem hiding this comment.
Q: If _make_item() takes None as an argument, why do you need to set the docstring explicitly on line 114 ?
|
|
||
| _simulate_logstart(plugin, "tests/test_foo.py::test_b") | ||
|
|
||
| plugin.backend.update_test_case_text.assert_not_called() |
Member
There was a problem hiding this comment.
I think a better assertion here would be that we've updated the text for test_a but not for test_b. Otherwise we may be missing a corner case.
|
|
||
| docstring = self._docstrings.get(nodeid) | ||
| if docstring: | ||
| self.backend.update_test_case_text(test_case["id"], docstring) |
Member
There was a problem hiding this comment.
Please move this immediately after line 70 - it makes more logical sense there.
Ignore if text hasn't changed Co-authored-by: Alexander Todorov <atodorov@otb.bg>
for more information, see https://pre-commit.ci
…but not for test_b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Making it so the text in the docstrings is what gets reported as text in kiwi tcms. This should allow for more descriptive test cases in kiwi