-
Notifications
You must be signed in to change notification settings - Fork 15
test: add unit tests for filters helpers #1543
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
base: main
Are you sure you want to change the base?
Conversation
"""Test is_exclusively_build_issue with known issue with test.""" | ||
result = is_exclusively_build_issue("issue123", 1, "test123") | ||
assert result is False | ||
|
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.
here isn't worth to add also a test for a unknown issue with valid test id?
def test_is_exclusively_build_issue_with_unknown_issue_with_test(self): | |
"""Test is_exclusively_build_issue with unknown issue but with test.""" | |
result = is_exclusively_build_issue(None, None, "test123") | |
assert result is False | |
issue_id=None, issue_version=None, incident_test_id="test123" | ||
) | ||
assert result is False | ||
|
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.
almost same here, but with (None, None, None)
def test_is_exclusively_test_issue_with_unknown_issue_no_test(self): | |
"""Test is_exclusively_test_issue with unknown issue and no test.""" | |
result = is_exclusively_test_issue( | |
issue_id=None, issue_version=None, incident_test_id=None | |
) | |
assert result is False |
def test_filter_data(): | ||
"""Test filter data for testing.""" | ||
return { | ||
"path": "test.other", | ||
"status": "PASS", |
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.
maybe it’s a nit, but wouldn’t it be better to avoid naming the fixture functions with the test_
prefix so pytest doesn’t collect them as tests?
Increase to 49%