Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests fail with SDL git main (2.25.x) #248

Closed
smcv opened this issue Nov 2, 2022 · 0 comments · Fixed by #249
Closed

Unit tests fail with SDL git main (2.25.x) #248

smcv opened this issue Nov 2, 2022 · 0 comments · Fixed by #249

Comments

@smcv
Copy link
Contributor

smcv commented Nov 2, 2022

What doesn't work?
test_SDL_GetRevision asserts that SDL_GetRevision() either starts with http or is empty, but that is not an API guarantee that SDL provides. As of 2022-11-02, it might have a value like SDL-release-2.24.0-644-g4c704ecfd or SDL-2.24.2-no-vcs (Debian 2.24.2+dfsg-1).

How To Reproduce

  • Install SDL git main (or Debian package 2.24.2+dfsg-1, which backports the relevant change)
  • pytest -k test_SDL_GetRevision

Platform (if relevant):

  • OS: Debian 12 alpha
  • Python Version: 3.10.8
  • SDL2 Version: Debian package 2.24.2+dfsg-1, or git main branch during 2.25.x development
  • Using pysdl2-dll: no

Additional context
The new format happens to start with SDL- (to make it easier to screen-scrape out of an unknown SDL binary with strings(1)), but the exact format was never an API guarantee: it's documented as "not intended to be reliable in any way".

smcv added a commit to smcv/py-sdl2 that referenced this issue Nov 2, 2022
The default format is going to change in 2.25.x, and in git main it
currently starts with "SDL-".

SDL specifically documents the result of this function as "not intended
to be reliable in any way", so it seems wrong to have pysdl2's tests fail
whenever the format changes. To address that, turn unexpected formats
into an xfail, so that they're flagged as something to investigate but
do not make the unit tests fail when used as a QA gate.

Resolves: py-sdl#248
Signed-off-by: Simon McVittie <smcv@collabora.com>
smcv added a commit to smcv/py-sdl2 that referenced this issue Nov 2, 2022
The default format is going to change in 2.25.x, and in git main it
currently starts with "SDL-".

SDL specifically documents the result of this function as "not intended
to be reliable in any way", so it seems wrong to have pysdl2's tests fail
whenever the format changes. To address that, turn unexpected formats
into an xfail, so that they're flagged as something to investigate but
do not make the unit tests fail when used as a QA gate.

Closes: py-sdl#248
Signed-off-by: Simon McVittie <smcv@collabora.com>
@a-hurst a-hurst closed this as completed in ffa8853 Nov 2, 2022
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 a pull request may close this issue.

1 participant