Skip to content

tests: port Python run tests to tests/lang (batch 2) - #955

Merged
godofecht merged 2 commits into
mainfrom
port/tests-to-flow
Sep 27, 2026
Merged

godofecht merged 2 commits into
mainfrom
port/tests-to-flow

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Batch 2 of moving the Python test suite to Flow. The batch sweeps every tests/unit and tests/integration file for tests that build a program and run it, and ports the ones Flow can express today.

What changed

  • 12 new tests/lang programs. The header of test_variadic_externs.flow is also extended. Each program's header names the Python tests it supersedes.
  • 19 Python test functions deleted across 14 files. Three files were removed outright: test_misra_euler_batch.py, test_span_narrowing_evaluates_once.py and test_flowc_span_element_type.py. Tracked Python shrinks.
  • docs/project/tests-in-flow.md now lists all 190 test files, with a Batch 2 section and a table mapping each blocked test to its issue.

Verification

  • Every new or changed tests/lang file passes ./flow test-lang (strict).
  • Every one compiles under the Stage-A bootstrap (compiler/build/flowc_bootstrap, bundle mode) and exits with the expected code. The one exception is test_max_iterations_abort, which compiles but exits 0 under Stage-A (Stage-A: @max_iterations bound is ignored at runtime #940).
  • Bootstrap suite: 119 pass, 19 fail. On main it is 107 pass, 19 fail, with the same 19 failures.
  • ./flow test-lang overall: 131 of 138 pass. The 7 failures are pre-existing files this PR does not touch (the c_import header paths, test_extern_type, test_overload_registry_port, and test_generic_channels via test-lang: programs importing stdlib/concurrent.flow fail to link on macOS (CoreFoundation missing) #953).
  • Python suite: 1887 passed, 9 failed, 2 errors. main shows the same 9 failures and 2 errors in the same files: tests/conformance/test_core_conformance.py, test_compilation_pipeline.py::test_jit_execution and test_match_exhaustive_returns.py.

Run tests left in Python

These pass under the Python host but fail under Stage-A or the strict checker. Each has an issue with a minimal repro:
#940 #941 #942 #943 #944 #945 #946 #947 #949 #950 #951 #952 #953 #954.

compiler/src and compiler/bootstrap are unchanged.

Thirteen tests/lang programs now cover run tests that used to transpile,
compile and run from Python. Each passes ./flow test-lang and compiles
under the Stage-A bootstrap. The superseded Python tests are deleted:
19 test functions across 14 files, three files removed outright.

Run tests that fail under Stage-A stay in Python, tracked in #940 to #954.
@godofecht
godofecht merged commit 860b7dd into main Sep 27, 2026
28 checks passed
@godofecht
godofecht deleted the port/tests-to-flow branch October 1, 2026 12:50
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