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

source-academy / py-slang / 29082024146
78%

Build:
DEFAULT BRANCH: main
Ran 10 Jul 2026 09:12AM UTC
Jobs 1
Files 87
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

10 Jul 2026 09:07AM UTC coverage: 77.752% (+0.1%) from 77.614%
29082024146

push

github

web-flow
input(): forward prompt through Conductor and flush pending stdout (#254)

* Forward input()'s prompt through Conductor and flush pending stdout

Completes the py-slang side of source-academy/py-slang#190: input()
was already blocking correctly via conductor.requestInput(), but
discarded its prompt argument entirely and never flushed stdout
buffered by earlier print()s before blocking.

- MiscBuiltins.input now accepts 0-1 args (@Validate(0, 1, ...)),
  writes the prompt to stdout (matching CPython's input(prompt)
  behavior) and forwards it to receiveInput/conductor.requestInput.
- createInputStream gained a setNextPrompt side-channel so its
  pull()-driven ReadableStream can pass a per-call prompt through to
  requestInput(), since pull() itself has no visibility into
  per-call arguments.
- receiveInput now flushes any buffered stdout before blocking, so
  print()s issued earlier in the same chunk aren't stuck in the
  buffer while the popup waits.
- Context.streams gained an optional flushStdout hook, wired up in
  PyCseEvaluator.evaluateChunk.
- Added src/tests/input.test.ts covering both the with- and
  without-prompt paths.

Depends on the (as yet unpublished) conductor protocol change adding
requestInput(prompt?). Points @sourceacademy/conductor at the local
checkout via a portal: resolution for now; repin to a real published
version once that lands upstream. Note: the portal symlink currently
breaks this repo's jest.config.js (its moduleNameMapper/
transformIgnorePatterns assume a real node_modules directory, not a
symlink resolving outside rootDir) - verified tests by temporarily
copying the built conductor package into node_modules instead; no
action needed once a real release replaces the portal link.

* Fix eager pull() firing a phantom requestInput before any input()

ReadableStream defaults to highWaterMark: 1, which makes it eagerly
call pull() as soon as it's constructed - i.e. during evaluator
init, before any Python input() call has... (continued)

2675 of 3728 branches covered (71.75%)

Branch coverage included in aggregate %.

15 of 15 new or added lines in 2 files covered. (100.0%)

6219 of 7711 relevant lines covered (80.65%)

12665.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 29082024146.1 10 Jul 2026 09:12AM UTC 87
77.75
GitHub Action Run
Source Files on build 29082024146
  • Tree
  • List 87
  • Changed 5
  • Source Changed 5
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29082024146
  • a398b31a on github
  • Prev Build on main (#29027177528)
  • Next Build on main (#29087459477)
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