Review feedback, both valid.
The control-character fixture caught every OSError, so an unwritable
temp directory or a full disk would have reported these security tests
as skipped instead of failing. It now skips only for errors that mean
the name itself is unrepresentable (EINVAL, EILSEQ, ENAMETOOLONG) and
re-raises everything else.
The mount-policy test derived the protected directory from the
checkout's drive, so a repo cloned to D: would look for D:\Windows,
miss, and skip the branch the test exists to cover. Ask Windows where
it is installed via SYSTEMROOT instead.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A full run on Windows 11 failed 31 tests, almost all because a fixture
assumed POSIX behaviour or read the developer's own Git configuration
rather than because Strix misbehaved. That noise hides real regressions.
- Resolve git with `shutil.which` instead of `/usr/bin/env git`, and skip
the module when no git is present. This single line accounted for 19 of
the 31 failures.
- Isolate every git subprocess from `GIT_CONFIG_GLOBAL`/`GIT_CONFIG_SYSTEM`
and supply a commit identity, so a global `core.excludesFile`,
`commit.gpgSign`, or `core.hooksPath` cannot change what a test sees.
- Create control-character filenames through a fixture that skips where
the filesystem rejects them, instead of failing to build the fixture.
- Choose the protected system directory for the platform in the mount
policy test. `check_mountable_dir` already handles both families, so on
Windows this now exercises the real policy instead of failing early.
- Assert secret-file permissions through a fixture that keeps the POSIX
0o600 check exact and, on Windows, skips with the reason stated rather
than weakening the assertion. The device-identity test is split so its
identity contract still runs everywhere.
- Pin mypy to `platform = "linux"` so type checking resolves the same
APIs as CI and the container target. This removes the six
`fcntl.flock`/`os.getuid`/`os.getgid` attribute errors reported on
Windows without adding ignores that `warn_unused_ignores` would then
flag on Linux.
Windows now reports 12 failures, all owned elsewhere: #1258 (7-8,
intermittent), #648/#652, #1288, and #1285.
Refs #1259
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The test suite was carrying migration scars and a long tail of
low-density assertions over SDK-derived behavior. Drop it wholesale.
- Delete ``tests/`` (42 files, ~4900 LoC).
- Drop ``pytest`` / ``pytest-asyncio`` / ``pytest-cov`` /
``pytest-mock`` from the dev dependency group; ``uv sync``
uninstalls the matching wheels.
- Strip the pytest + coverage config blocks, the
``flake8-pytest-style`` ruff selector, the ``tests/**`` per-file
ignores, the ``[tool.mypy.overrides] tests.*`` block, and the
``"tests"`` entry from bandit's ``exclude_dirs``.
- Drop the ``test`` / ``test-cov`` Makefile targets; ``dev`` no
longer depends on tests.
- Strip the ``# Testing`` block from ``.gitignore`` (``.coverage``,
``.pytest_cache/``, ``htmlcov/``, ``coverage.xml``, ``nosetests.xml``,
``.tox/``, ``.hypothesis/``).
ruff (27) and mypy (82) baselines unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add comprehensive test suite for the argument_parser module including:
- Tests for _convert_to_bool with truthy/falsy values
- Tests for _convert_to_list with JSON and comma-separated inputs
- Tests for _convert_to_dict with valid/invalid JSON
- Tests for convert_string_to_type with various type annotations
- Tests for convert_arguments with typed functions
- Tests for ArgumentConversionError exception class
This establishes the foundation for the project's test infrastructure
with pytest configuration already in place.