Add initial pytest unit-test suite (+ CI)#499
Open
potato-20 wants to merge 2 commits into
Open
Conversation
The project shipped without any automated tests. This adds a tests/ package with 34 unit tests covering the host-side pure-Python helpers: - reversec.common.list (chunk, flatten) - reversec.common.text (indent, wrap) - reversec.common.fs (read/write/touch round-trips) - drozer.util (parse_server, StoreZeroOrTwo) - drozer.android.Intent (validity, defaults, flag combination) pyproject.toml gains a [tool.pytest.ini_options] section (pythonpath = src) so the suite runs with a bare 'pytest' invocation, plus a 'test' optional dependency. No production code is changed.
Adds a GitHub Actions workflow that runs the unit test suite across Python 3.9-3.13 on every push and pull request.
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.
The repository currently ships without any automated tests. This PR introduces a
tests/package and a CI workflow to run it, without changing any production code.What this adds
34 unit tests covering the host-side, dependency-free Python helpers:
reversec.common.listchunk,flatten(incl. strings-are-not-flattened)reversec.common.textindent,wrap(newline preservation)reversec.common.fsread/write/touchround-trips, missing-file handlingdrozer.utilparse_serverparsing,StoreZeroOrTwo0/2-arg validationdrozer.android.IntentTooling
pyproject.toml: a[tool.pytest.ini_options]section withpythonpath = ["src"]so the suite runs with a barepytest(no editable install needed), plus atestoptional-dependency..github/workflows/tests.yml: runspytestacross Python 3.9–3.13 on every push and pull request.Notes