-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/34 introduce unit tests for generator #67
base: master
Are you sure you want to change the base?
Conversation
This reverts commit bf8b45d.
…-Introduce-Unit-Tests-For-Generator
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.
- pulled
- local run
- unit test run
Missing tests: - action_input: I would cover three static methods by tests to check default values expected by documentation.
- github_projects: I would propose new issue to implement Integration test - testing current branch code for mining with full features enabled (result can be empty, it depends - it is not exact counting test)
@@ -1,7 +1,7 @@ | |||
[tool.black] | |||
line-length = 120 | |||
target-version = ['py311'] | |||
force-exclude = '''test''' | |||
#force-exclude = '''test''' |
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.
#force-exclude = '''test''' | |
force-exclude = '''test''' |
mock_logger_info = mocker.patch("living_documentation_generator.generator.logger.info") | ||
mock_logger_debug = mocker.patch("living_documentation_generator.generator.logger.debug") | ||
|
||
issue_mock = mocker.Mock() |
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.
issue_mock = mocker.Mock() | |
mock_issue = mocker.Mock() |
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.
When mocking then keep the same format.
project_issue_2 = mocker.Mock(spec=ProjectIssue) | ||
project_issue_2.organization_name = "OrgA" | ||
project_issue_2.repository_name = "RepoA" | ||
project_issue_2.number = 1 |
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.
project_issue_2.number = 1 | |
project_issue_2.number = 2 |
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 I am a little bit confused - Issue in same repo with two states? As I understand the test code you want to simulate two project issues for two issues right?
Unit tests using Pytest for generator.py and main.py.
Release Notes:
Closes #34