Skip to content

recipe-tester: run on-device tests against the Flet 0.86#104

Merged
ndonkoHenri merged 9 commits into
mainfrom
test-0.86
Jul 11, 2026
Merged

recipe-tester: run on-device tests against the Flet 0.86#104
ndonkoHenri merged 9 commits into
mainfrom
test-0.86

Conversation

@ndonkoHenri

Copy link
Copy Markdown

Changes

Bump the test toolchain to 0.86.0.dev

  • build-wheels-version.yml: the recipe-tester flet build apk / flet build ios-simulator steps now pin --with flet-cli>=0.86.0.dev0 --with flet>=0.86.0.dev0 and pass --python-version.
  • tests/recipe-tester/pyproject.toml.tpl: app deps pinned flet>=0.86.0.dev0 (and flet[all] in the dev group).

Adapt the recipe-tester to 0.86 packaging

  • tests/recipe-tester/main.py: anchor the pytest --rootdir/target to dirname(__file__) instead of the relative recipe_tests. Flet 0.86 runs the app with cwd = <container>/Library/Application Support/data, so the relative path no longer resolved (pytest EXIT 4).
  • tests/recipe-tester/pyproject.toml.tpl: [tool.flet.compile] app = false. Flet 0.86 compiles the app to .pyc and strips the source by default; pytest only collects .py, so the bundled tests reported "0 items" (EXIT 5). This keeps the app/test source as .py; bundled packages are still compiled (compile.packages untouched).

Depends on the serious_python x86_64 fix

Android x86_64 still fails on ModuleNotFoundError: certifi because serious_python 4.3.0 packs an empty sitepackages.zip for the x86_64 Android build (arm64-v8a is fine; x86_64 is in android_abis, and build/site-packages/x86_64/ is populated — it just isn't zipped). Will be fixed by flet-dev/serious-python#229.

ndonkoHenri and others added 9 commits July 10, 2026 13:21
Two Flet-0.86 packaging changes broke the on-device pytest run once the app's
flet was pinned to 0.86 (past the certifi/AF_UNIX crashes):

- cwd is now <container>/Library/Application Support/data, so main.py's
  relative 'recipe_tests' rootdir/target no longer resolved (pytest EXIT 4).
  Anchor the path to __file__ instead.
- the app is compiled to .pyc with the source stripped by default; pytest only
  collects .py, so 0 tests were collected (EXIT 5). Set [tool.flet.compile]
  app = false so the app/test source is kept (--compile-packages stays on).

Verified on an iPhone 16 simulator: collected + passed + EXIT 0.
The iOS 'Stage tests + build recipe-tester iOS sim app' step referenced
$INPUT_PYTHON_VERSION but never set it in env (only the APK step did). Under
set -u the var was unbound, so --python-version expanded to '' and flet build
defaulted to Python 3.14 — whose iOS stdlib lacks _pyrepl, so pytest's pdb
import crashed with INTERNALERROR (EXIT 3) even on the 3.12 leg. Set the var
like the APK lane so iOS bundles the matrix Python (3.12).
The unquoted '>=' in 'uvx --with flet-cli>=0.86.0.dev0' was parsed by the shell
as a redirection (> to a file '=0.86.0.dev0'), dropping the version constraint —
so flet-cli/flet resolved to stable 0.85.3, whose 'flet build' rejects
--python-version and the build failed on both platforms. Quote the specifiers
and pass --prerelease allow (a >=dev bound alone doesn't enable prereleases).
Verified: uvx --prerelease allow --with 'flet-cli>=0.86.0.dev0' flet --version -> 0.86.0.dev2.
@ndonkoHenri ndonkoHenri merged commit d9355ec into main Jul 11, 2026
27 of 28 checks passed
@ndonkoHenri ndonkoHenri deleted the test-0.86 branch July 11, 2026 14:04
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