Skip to content

resolve ci_pytest issues for Windows#95

Merged
nbehrnd merged 4 commits into
novoid:masterfrom
nbehrnd:dev
Mar 2, 2026
Merged

resolve ci_pytest issues for Windows#95
nbehrnd merged 4 commits into
novoid:masterfrom
nbehrnd:dev

Conversation

@nbehrnd

@nbehrnd nbehrnd commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator

Previously, a few of the unit tests compiled in unit_tests.py failed when using GitHub's osrunner of Windows because how this operating system organizes and manages .lnk files. 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.

nbehrnd added 4 commits March 2, 2026 16:50
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]>
@nbehrnd
nbehrnd merged commit 8585c6f into novoid:master Mar 2, 2026
5 checks passed
@nbehrnd
nbehrnd deleted the dev branch March 2, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant