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

penguinolog / urwid / 41618009658 / 6
94%
master: 94%

Build:
DEFAULT BRANCH: master
Ran 03 Nov 2026 10:35AM UTC
Files 74
Run time 1s
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

03 Nov 2026 10:12AM UTC coverage: 90.844% (+0.3%) from 90.575%
41618009658.6

push

github

web-flow
Add get_running_loop() and watch the Terminal pty on the running loop (#1569)

* Add get_running_loop() for the MainLoop of the current thread and task

Widgets and callbacks can find the loop they run under instead of being
handed it; get_running_loop_or_none() returns None where none runs.

- A ContextVar holds a tuple of activation records shared by every
  context that copies it; start() publishes one, stop() clears it, so
  the loop disappears from all of them at once and none keeps it alive.
- Every alarm, watched file, watched pipe, input and idle callback runs
  with the loop current, also where the event loop copied the context
  before start() (asyncio, trio).
- A callback that runs after stop() sees no loop, not another loop
  running in the context it inherited.
- draw_screen() and process_input() called by hand see the loop even
  before start().
- watch_file() hands the event loop a wrapper instead of the callback.
- A failed start() nested in a callback of the same loop keeps the
  outer run current.

* Service watched descriptors in the screen-driven main loop

The loop for a screen without event loop support (the curses screen)
ran alarms but never the callbacks of watch_file() and watch_pipe().

- While something is watched, the wait for input is cut into 0.1 s
  polls, and ready watches run after each read; the screen is redrawn
  after a watch ran.
- A watch removed or replaced by an earlier callback of the same pass
  is skipped.
- On Windows the curses screen cannot stop waiting before a key, so
  watches are checked only after input, as expired alarms already are.

* Watch the Terminal pty on the running loop

A Terminal built without main_loop= watched its pty on a private
SelectEventLoop that nothing ran, so it showed no child output.

- Without main_loop= the pty is watched on the started MainLoop the
  terminal is rendered under; the watch moves at the first render
  under another loop, another start of the same loop, or no ... (continued)

6257 of 7054 branches covered (88.7%)

Branch coverage included in aggregate %.

15731 of 17150 relevant lines covered (91.73%)

0.92 hits per line

Source Files on job run-3.12-ubuntu-latest - 41618009658.6
  • Tree
  • List 74
  • Changed 8
  • Source Changed 6
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 41618009658
  • cbb4e95c on github
  • Prev Job for on master (#41465346988.10)
  • Next Job for on master (#41680469536.16)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc