-
Notifications
You must be signed in to change notification settings - Fork 49
Ignore coverage of non-production code #1175
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -777,7 +777,7 @@ def on_close(self) -> None: | |
| self.root.destroy() | ||
|
|
||
|
|
||
| def argument_parser() -> Namespace: | ||
| def argument_parser() -> Namespace: # pragma: no cover | ||
| """ | ||
| Parses command-line arguments for the script. | ||
|
|
||
|
|
@@ -806,7 +806,7 @@ def argument_parser() -> Namespace: | |
|
|
||
|
|
||
| # pylint: disable=duplicate-code | ||
| def main() -> None: | ||
| def main() -> None: # pragma: no cover | ||
|
||
| args = argument_parser() | ||
|
|
||
| state = ApplicationState(args) | ||
|
|
@@ -865,5 +865,5 @@ def register_motor_test_plugin() -> None: | |
| plugin_factory.register(PLUGIN_MOTOR_TEST, _create_motor_test_view) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| if __name__ == "__main__": # pragma: no cover | ||
|
||
| main() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -378,7 +378,7 @@ def get_vehicle_image_filepath(self, template_path: str) -> str: | |
| return self.vehicle_components_provider.get_vehicle_image_filepath(template_path) | ||
|
|
||
|
|
||
| def argument_parser() -> argparse.Namespace: | ||
| def argument_parser() -> argparse.Namespace: # pragma: no cover | ||
|
||
| """ | ||
| Parses command-line arguments for the script. | ||
|
|
||
|
|
@@ -412,7 +412,7 @@ def setup_logging(loglevel: str) -> None: | |
| logging_basicConfig(level=logging_getLevelName(loglevel), format="%(asctime)s - %(levelname)s - %(message)s") | ||
|
|
||
|
|
||
| def main() -> None: | ||
| def main() -> None: # pragma: no cover | ||
|
||
| """Main entry point for the application.""" | ||
| args = argument_parser() | ||
| setup_logging(args.loglevel) | ||
|
|
@@ -424,5 +424,5 @@ def main() -> None: | |
| logging_info(ProgramSettings.get_recently_used_dirs()[0]) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| if __name__ == "__main__": # pragma: no cover | ||
|
||
| main() | ||
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
argument_parserfunction should not be excluded from coverage. This function is tested intests/test_frontend_tkinter_motor_test.py(seetest_argument_parser_wires_common_arguments), and excluding it from coverage will hide the fact that it has test coverage. Remove the pragma comment to allow coverage tracking for this tested function.