Skip to content

vamos: fix test suite regressions from the bebbo sync - #2

Merged
MBeijer merged 4 commits into
AmigaPorts:mainfrom
codewiz:fix-vamos-tests
Aug 21, 2026
Merged

vamos: fix test suite regressions from the bebbo sync#2
MBeijer merged 4 commits into
AmigaPorts:mainfrom
codewiz:fix-vamos-tests

Conversation

@codewiz

@codewiz codewiz commented Aug 21, 2026

Copy link
Copy Markdown

Three fixes for test failures introduced by #1 (the full pytest suite is green with these):

  • stdin fileno guard: Flush and FGets compared fh.obj.fileno() with sys.stdin.fileno(), which raises io.UnsupportedOperation under pytest's captured stdin (and any pseudofile stdin). This broke the proc_args and dos_system suites.
  • ALibInfo refcount: base_addrs was preseeded with the load address at count 1, so natively loaded libraries never dropped to zero opens and were never expunged. This broke 10 libmgr/libnative unit tests. If closing a library via its load address needs supporting, it should be handled explicitly in close_lib instead.
  • headless intuition.library: open_lib imported sdl2 for any use of the library, failing even graphics-free calls like CurrentTime when pysdl2 is not installed (as in the CI tox envs). It now degrades to headless; the rendering paths import sdl2 lazily and fail only when actually used.

Flush and FGets compared fh.obj.fileno() with sys.stdin.fileno(),
which raises io.UnsupportedOperation under pytest's captured stdin
and on any pseudofile stdin. Guard the comparison.
The preseeded refcount never drops to zero, so natively loaded
libraries were never recognized as closed and never expunged,
breaking 10 libmgr/libnative unit tests. If closing a library via
its load address needs supporting, it should be handled explicitly
in close_lib instead.
open_lib required sdl2 for any use of the library, failing even
graphics-free calls like CurrentTime when pysdl2 is not installed
(as in the CI tox envs). Degrade to headless instead; the rendering
paths import sdl2 lazily and fail only when actually used. Guard
close_lib against the screen that was never created.
actions/checkout@v3 and setup-python@v4 target the deprecated
Node.js 20 runtime and warn on every run.
@MBeijer
MBeijer merged commit 48a1a27 into AmigaPorts:main Aug 21, 2026
10 checks passed
@codewiz
codewiz deleted the fix-vamos-tests branch August 21, 2026 18:29
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.

2 participants