• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

source-academy / py-slang / 29634557125
87%

Build:
DEFAULT BRANCH: main
Ran 18 Jul 2026 06:58AM UTC
Jobs 1
Files 104
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Jul 2026 06:45AM UTC coverage: 86.869% (+5.9%) from 80.964%
29634557125

push

github

web-flow
Add WASM to the table-driven operator conformance sweep (#276)

* Add WASM to the table-driven operator conformance sweep; fix real gaps it found

Adds operator-conformance-wasm.test.ts, mirroring
operator-conformance-pvml.test.ts: sweeps the same spec-table-driven
type × operator cross product (docs/specs/python_typing_*.tex) through
compileToWasmAndRun, chapters 1-4, validated against a live CSE
reference. Comparison is value-aware rather than raw-text, since the
WASM runtime's log_float/log_complex host imports render differently
from toPythonString (e.g. "2" vs "2.0", "1 + 2j" vs "(1+2j)") without
being wrong.

The sweep surfaced several real gaps in the WASM engine, all fixed here:

- Complex division was silently wrong: DIV_FX used local.tee to name
  the already-divided real part "$denom", then reused that value as
  the imaginary part's divisor instead of the true c^2+d^2 denominator.
- **, //, and % were entirely unimplemented (compile-time "Unsupported
  binary operator"). Added ARITHMETIC_OP_TAG.FLOORDIV/MOD/POW,
  delegated to a new arith.ext host import that reuses CSE's own
  pythonMod and PyComplexNumber.pow (floor-division needs Python's
  floor-toward-negative-infinity semantics, and ** needs
  arbitrary-precision bigint exponentiation plus general complex power
  via log/exp/atan2/cos/sin, none of which are native WASM
  instructions) -- guaranteeing bit-for-bit parity with CSE instead of
  a second, independently-derived implementation.
- is/is not were entirely unimplemented. Added COMPARISON_OP_TAG.IS/
  ISNOT and an identity check mirroring CSE's pyIdentical: same-tag
  values compare by underlying value for scalars (no bool/int
  coercion, unlike ==), by pointer for lists/tuples, and None is
  always identical to None. Closures compare by their packed
  (tag,arity,env_size,parent_env) representation, an approximation of
  per-object identity -- documented as a known gap, since there's no
  distinct heap-allocated closure object ... (continued)

3715 of 4596 branches covered (80.83%)

Branch coverage included in aggregate %.

58 of 60 new or added lines in 4 files covered. (96.67%)

40 existing lines in 4 files now uncovered.

8140 of 9051 relevant lines covered (89.93%)

159813.06 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
85.61
-4.86% src/engines/wasm/hostImports.ts

Coverage Regressions

Lines Coverage ∆ File
34
87.64
3.47% src/engines/pvml/builtins.ts
3
90.05
0.45% src/engines/wasm/builderGenerator.ts
2
86.41
0.63% src/tests/utils.ts
1
83.81
62.6% src/runner.ts
Jobs
ID Job ID Ran Files Coverage
1 29634557125.1 18 Jul 2026 06:58AM UTC 104
86.87
GitHub Action Run
Source Files on build 29634557125
  • Tree
  • List 104
  • Changed 13
  • Source Changed 9
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29634557125
  • ec6927a7 on github
  • Prev Build on main (#29631471367)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc