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

source-academy / py-slang / 28601234788
78%

Build:
DEFAULT BRANCH: main
Ran 02 Jul 2026 03:22PM UTC
Jobs 1
Files 83
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

02 Jul 2026 03:19PM UTC coverage: 77.135% (+1.0%) from 76.16%
28601234788

push

github

web-flow
feat: implement nonlocal keyword and scope conflict validators (#182)

* fix: buffer stdout and flush as a single sendOutput to fix multiple prints

When print() was called multiple times, only the first line appeared.
Root cause: each sendOutput call sends a separate postMessage to the
host, where the frontend's redux-saga handleStdout task processes one
message per iteration. The STATUS STOPPED message arriving after all
output would trigger task cancellation, but the saga scheduler could
cancel handleStdout between iterations, dropping remaining messages.

Fix: collect all stdout writes into a local buffer during evaluation and
flush the entire buffer as a single sendOutput call after collectSnapshots
completes. One message = one handleStdout iteration = no race condition.
The flush also runs in the catch path so partial output before an error
is still shown.

* fix: clear buffer after flush and add tests for createBufferedOutputStream

- Reset buffer to "" after sendOutput so double-flush (try path + catch
  path when sendSnapshots throws) never duplicates output
- Use strict !== "" check instead of truthy to match the guard condition
  unambiguously
- Add streams.test.ts with 3 unit tests covering: single-flush batching,
  no-op on empty buffer, and idempotent double-flush

Addresses Gemini review comment on PR 176 and restores coveralls coverage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: implement nonlocal keyword and scope conflict validators (#177-#181)

Closes #177: nonlocal keyword now works at runtime — Closure gains
nonlocalVariables set; FunctionDef handler populates it via
scanForNonlocalDeclarations; Variable reads and ASSIGNMENT writes are
routed through pyGetNonlocalVariable/pySetNonlocalVariable which walk
the enclosing function env chain (stopping before the module scope).
The NonLocal statement is registered as a no-op handler so it no longer
crashes the interpreter.

Closes #178: resolver raises SyntaxErr... (continued)

2386 of 3389 branches covered (70.4%)

Branch coverage included in aggregate %.

259 of 272 new or added lines in 8 files covered. (95.22%)

3 existing lines in 1 file now uncovered.

5835 of 7269 relevant lines covered (80.27%)

13861.26 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
85.42
7.3% src/resolver/resolver.ts
4
81.1
3.8% src/engines/cse/utils.ts
1
70.82
8.69% src/errors/errors.ts

Coverage Regressions

Lines Coverage ∆ File
3
85.42
7.3% src/resolver/resolver.ts
Jobs
ID Job ID Ran Files Coverage
1 28601234788.1 02 Jul 2026 03:22PM UTC 83
77.13
GitHub Action Run
Source Files on build 28601234788
  • Tree
  • List 83
  • Changed 8
  • Source Changed 8
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28601234788
  • adf541b3 on github
  • Prev Build on main (#28502418838)
  • Next Build on main (#28601810324)
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