feature: add support for the checker tool - #31
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
==========================================
- Coverage 97.15% 97.09% -0.06%
==========================================
Files 7 9 +2
Lines 387 448 +61
Branches 38 44 +6
==========================================
+ Hits 376 435 +59
Misses 6 6
- Partials 5 7 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| __LOGGER__ = logging.getLogger('pysdccc.checker_tool') | ||
|
|
||
|
|
||
| class SdcccCheckerTool: |
There was a problem hiding this comment.
the checkcer tool is not mentioned in the README, for the user who is seeing the checker-tool for the first time (like me) it is very hard to deal with, i suggest enhancing the CLI doc
|
|
||
| :param local_path: The local path to search for executables. | ||
| :param checker_tool: If True, select the checker tool executable (name contains | ||
| :data:`CHECKER_TOOL_MARKER`); otherwise select the test runner executable. |
| file matching the pattern "sdccc-*.exe" to be present in the directory. If no such file or more than one file is | ||
| found, a FileNotFoundError is raised. | ||
| This function searches the specified local path for the SDCcc test runner executable (``*.exe`` whose name does not | ||
| follow ``sdccc-internal-<version>.exe``). The checker tool executable, if present, is ignored. |
There was a problem hiding this comment.
the sdccc-internal is mentioned out of a sudden in multiple places, the original implemtation refered the SDCcc executable
| """Get the path to the SDCcc checker tool executable.""" | ||
| return anyio.Path(self._exe) | ||
|
|
||
| def _prepare_command( |
| mdib: _common.PATH_TYPE, | ||
| reference: _common.PATH_TYPE, | ||
| **kwargs: _common.CMD_TYPE, | ||
| ) -> int: |
There was a problem hiding this comment.
| ) -> int: | |
| ) -> int | None: |
| @@ -16,7 +16,16 @@ | |||
|
|
|||
| import pysdccc | |||
| import pysdccc._cli | |||
|
|
||
| def test_get_exe_path_ignores_checker_tool(): | ||
| """Test that the runner and checker tool executables are told apart when both are present.""" | ||
| runner = pathlib.Path('sdccc-internal-1.0.0.exe') |
There was a problem hiding this comment.
inconsistent with other tests which use pathlib.Path('sdccc-1.0.0.exe')
| mock.patch('pathlib.Path.is_file', return_value=True), | ||
| pytest.raises(FileNotFoundError), | ||
| ): | ||
| _common.get_checker_tool_exe_path(runner) |
There was a problem hiding this comment.
maybe also assert the expected message
| ### Formatting / Static Code Analysis | ||
|
|
||
| - Use [ruff](https://docs.astral.sh/ruff/) to ensure your code adheres to our coding standards. | ||
| - Use [pyright](https://github.com/microsoft/pyright) for type checking. Ensure your code is typed and passes pyright checks. |
There was a problem hiding this comment.
according to changelog, was replaced by ty
| "Development Status :: 5 - Production/Stable", | ||
| "Programming Language :: Python :: 3", | ||
| "License :: OSI Approved :: MIT License", | ||
| "Operating System :: OS Independent", |
No description provided.