resolve ci_pytest issues for Windows#95
Merged
Merged
Conversation
Apparently, the organization of linkfiles in Windows differs from the one in Linux; and much more, than thought earlier. In addition to this, the additional `.lnk` is visible only in a shell (git BASH; Windows' `cmd.exe`, or PowerShell) however not in the default GUI filemanager Windows is shipped (regardless if the user opts-in to display file extensions like `.txt`, or not). The edit of this commit thus only is a starter of additional checks and likely similar edits to the source code. Signed-off-by: Norwid Behrnd <[email protected]>
Previously, tests about the deletion of tagtrees in GitHub's Windows osrunner failed, while the same tests in the runners of Ubuntu an MacOS passed. This likely is due how these files are "released" for deletion with greter ease (Linux/MacOS), or not (Windows). This is addressed by function `force_rmtree` added to `__init__.py`, result of a discussion with Claude AI/Sonnet 4.6. Simultaneously, this commit corrects the addition of the file extension `.lnk` in one of the tests. When submitted to the check by `ci_pytest.yml`, now each unit test compiled in `unit_tests.py` passes with Python 3.14 and either osrunner of Ubuntu 24.04.3, Microsoft Windows Server 2025 / 10.0.26100, and macOS 15.7.4 GitHub currently provides as ubuntu-latest, windows-latest, macos-latest. Signed-off-by: Norwid Behrnd <[email protected]>
For an easier launch of the unit tests by `pytest`, file `unit_tests.py` was renamed and thus now is discovered automatically from the root of the project. Signed-off-by: Norwid Behrnd <[email protected]>
To easier track of the packages used, the imports are isort like sorted. Signed-off-by: Norwid Behrnd <[email protected]>
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.
Previously, a few of the unit tests compiled in
unit_tests.pyfailed when using GitHub's osrunner of Windows because how this operating system organizes and manages.lnkfiles. This issue is addressed here with edits in both the script and the tests. Now each of the tests pass with Python 3.14 and GitHub's current latest images of Windows/MacOS/Linux.