Skip to content

Conversation

@regro-cf-autotick-bot
Copy link
Contributor

This PR has been triggered in an effort to update python314.

Notes and instructions for merging this PR:

  1. Please merge the PR only after the tests have passed.
  2. Feel free to push to the bot's branch to update this PR if needed.

Please note that if you close this PR we presume that the feedstock has been rebuilt, so if you are going to perform the rebuild yourself don't close this PR until the your rebuild has been merged.


If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase @conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/cf-scripts/actions/runs/17422856000 - please use this URL for debugging.

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

@Tobias-Fischer
Copy link
Contributor

Failures:


________________________ test_SDL_SetWindowDisplayMode _________________________

window = <sdl2.video.LP_SDL_Window object at 0x7f64721b38c0>

    def test_SDL_SetWindowDisplayMode(window):
        # NOTE: Sets the fullscreen mode of the window, so can't easily test
        # NOTE: If set mode not supported, will change to closest supported res
        dindex = sdl2.SDL_GetWindowDisplayIndex(window)
        dmode = sdl2.SDL_DisplayMode()
        ret = sdl2.SDL_GetCurrentDisplayMode(dindex, byref(dmode))
        assert ret == 0
        sdl2.SDL_SetWindowDisplayMode(window, dmode)
        wmode = sdl2.SDL_DisplayMode()
        ret = sdl2.SDL_GetWindowDisplayMode(window, byref(wmode))
        assert ret == 0, _check_error_msg()
>       assert dmode == wmode
E       assert SDL_DisplayMode(1024x768 @ 0Hz) == SDL_DisplayMode(1024x768 @ 60Hz)

dindex     = 0
dmode      = SDL_DisplayMode(1024x768 @ 0Hz)
ret        = 0
window     = <sdl2.video.LP_SDL_Window object at 0x7f64721b38c0>
wmode      = SDL_DisplayMode(1024x768 @ 60Hz)

../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.10/site-packages/sdl2/test/video_test.py:391: AssertionError
_________________________ test_SDL_SetWindowFullscreen _________________________

with_sdl = None

    def test_SDL_SetWindowFullscreen(with_sdl):
        # TODO: Add non-hidden test once annoying test toggle implemented
        flags = (
            sdl2.SDL_WINDOW_BORDERLESS | sdl2.SDL_WINDOW_HIDDEN,
            sdl2.SDL_WINDOW_RESIZABLE | sdl2.SDL_WINDOW_HIDDEN,
        )
        is_fullscreen = sdl2.SDL_WINDOW_FULLSCREEN
        for flag in flags:
            window = sdl2.SDL_CreateWindow(b"Test", 0, 0, 1024, 768, flag)
            sdl2.SDL_SetWindowFullscreen(window, True)
            flags = sdl2.SDL_GetWindowFlags(window)
>           assert flags & is_fullscreen == is_fullscreen
E           assert (24 & 1) == 1

flag       = 24
flags      = 24
is_fullscreen = 1
window     = <sdl2.video.LP_SDL_Window object at 0x7f64721b37c0>
with_sdl   = None

../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.10/site-packages/sdl2/test/video_test.py:648: AssertionError

@Tobias-Fischer
Copy link
Contributor

/cc @conda-forge/sdl - it seems like there are some failures with the new sdl2-compat packages that did not occur with the "standard" sdl2

@traversaro
Copy link

/cc @conda-forge/sdl - it seems like there are some failures with the new sdl2-compat packages that did not occur with the "standard" sdl2

I opened conda-forge/sdl-feedstock#43 to update the sdl2-compat to the latest version, not sure if it will fix the problems but it is worth a shot as each release brings in a lot of bugfix for several corner case.

@traversaro
Copy link

@conda-forge-admin please rerun ci

@traversaro
Copy link

@conda-forge-admin, please restart ci

@traversaro
Copy link

Nice ChatGPT search: https://chatgpt.com/share/68c7baaf-1b28-8006-9418-66fe15e25704 .

TL;DR:

A few related issues:

It seems that there are fixes in pysdl2 main branch, but still unreleased. At least on Linux, the test failures after the sdl2-compat update (that fixed the full screen stuff) are:

2025-09-14T15:32:51.9965976Z =================================== FAILURES ===================================
2025-09-14T15:32:51.9966424Z _______________________________ test_SDL_SetHint _______________________________
2025-09-14T15:32:51.9966664Z 
2025-09-14T15:32:51.9966948Z with_sdl = None
2025-09-14T15:32:51.9967135Z 
2025-09-14T15:32:51.9967398Z     def test_SDL_SetHint(with_sdl):
2025-09-14T15:32:51.9967738Z         assert sdl2.SDL_SetHint(b"TEST", b"32") == 1
2025-09-14T15:32:51.9968218Z         assert sdl2.SDL_GetHint(b"TEST") == b"32"
2025-09-14T15:32:51.9968522Z         assert sdl2.SDL_SetHint(b"TEST", b"abcdef") == 1
2025-09-14T15:32:51.9968967Z         assert sdl2.SDL_GetHint(b"TEST") == b"abcdef"
2025-09-14T15:32:51.9969226Z >       assert sdl2.SDL_SetHint(b"", b"hi") == 1
2025-09-14T15:32:51.9969467Z E       AssertionError: assert 0 == 1
2025-09-14T15:32:51.9969728Z E        +  where 0 = <_FuncPtr object at 0x7ff3ffac7e90>(b'', b'hi')
2025-09-14T15:32:51.9970021Z E        +    where <_FuncPtr object at 0x7ff3ffac7e90> = sdl2.SDL_SetHint
2025-09-14T15:32:51.9970157Z 
2025-09-14T15:32:51.9970350Z with_sdl   = None
2025-09-14T15:32:51.9970462Z 
2025-09-14T15:32:51.9970917Z ../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.13/site-packages/sdl2/test/hints_test.py:35: AssertionError
2025-09-14T15:32:51.9971540Z ____________________________ test_TTF_GlyphMetrics _____________________________
2025-09-14T15:32:51.9971696Z 
2025-09-14T15:32:51.9971894Z with_sdl_ttf = None
2025-09-14T15:32:51.9971991Z 
2025-09-14T15:32:51.9972216Z     def test_TTF_GlyphMetrics(with_sdl_ttf):
2025-09-14T15:32:51.9972445Z         expected = {
2025-09-14T15:32:51.9972654Z             'A': [1, 25, 0, 29, 25],
2025-09-14T15:32:51.9972870Z             'j': [-3, 7, -9, 28, 9],
2025-09-14T15:32:51.9973087Z             '.': [2, 7, -1, 4, 8]
2025-09-14T15:32:51.9973277Z         }
2025-09-14T15:32:51.9989257Z         font = sdlttf.TTF_OpenFont(fontfile, 40)
2025-09-14T15:32:51.9993385Z         minX, maxX, minY, maxY = c_int(0), c_int(0), c_int(0), c_int(0)
2025-09-14T15:32:51.9994958Z         adv = c_int(0)
2025-09-14T15:32:51.9995377Z         for char in expected.keys():
2025-09-14T15:32:51.9995697Z             ret = sdlttf.TTF_GlyphMetrics(
2025-09-14T15:32:51.9996003Z                 font, ord(char),
2025-09-14T15:32:51.9996391Z                 byref(minX), byref(maxX), byref(minY), byref(maxY), byref(adv)
2025-09-14T15:32:51.9996706Z             )
2025-09-14T15:32:51.9997015Z             results = [x.value for x in (minX, maxX, minY, maxY, adv)]
2025-09-14T15:32:51.9997357Z             assert sdlttf.TTF_GetError() == b""
2025-09-14T15:32:51.9997654Z             assert ret == 0
2025-09-14T15:32:51.9997951Z >           assert results == expected[char]
2025-09-14T15:32:51.9998267Z E           assert [-3, 7, -9, 29, 9] == [-3, 7, -9, 28, 9]
2025-09-14T15:32:51.9998553Z E             
2025-09-14T15:32:51.9998836Z E             At index 3 diff: 29 != 28
2025-09-14T15:32:51.9999087Z E             
2025-09-14T15:32:52.0003995Z E             Full diff:
2025-09-14T15:32:52.0009341Z E               [
2025-09-14T15:32:52.0010003Z E                   -3,
2025-09-14T15:32:52.0010279Z E                   7,
2025-09-14T15:32:52.0010548Z E                   -9,
2025-09-14T15:32:52.0010807Z E             -     28,
2025-09-14T15:32:52.0011108Z E             ?      ^
2025-09-14T15:32:52.0011363Z E             +     29,
2025-09-14T15:32:52.0011616Z E             ?      ^
2025-09-14T15:32:52.0011864Z E                   9,
2025-09-14T15:32:52.0012118Z E               ]
2025-09-14T15:32:52.0012297Z 
2025-09-14T15:32:52.0012558Z adv        = c_int(9)
2025-09-14T15:32:52.0012825Z char       = 'j'
2025-09-14T15:32:52.0013136Z expected   = {'.': [2, 7, -1, 4, 8], 'A': [1, 25, 0, 29, 25], 'j': [-3, 7, -9, 28, 9]}
2025-09-14T15:32:52.0013599Z font       = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e86eaed0>
2025-09-14T15:32:52.0013948Z maxX       = c_int(7)
2025-09-14T15:32:52.0014257Z maxY       = c_int(29)
2025-09-14T15:32:52.0014534Z minX       = c_int(-3)
2025-09-14T15:32:52.0014808Z minY       = c_int(-9)
2025-09-14T15:32:52.0015090Z results    = [-3, 7, -9, 29, 9]
2025-09-14T15:32:52.0015370Z ret        = 0
2025-09-14T15:32:52.0015643Z with_sdl_ttf = None
2025-09-14T15:32:52.0015812Z 
2025-09-14T15:32:52.0016348Z ../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.13/site-packages/sdl2/test/sdlttf_test.py:373: AssertionError
2025-09-14T15:32:52.0017736Z ___________________________ test_TTF_GlyphMetrics32 ____________________________
2025-09-14T15:32:52.0018150Z 
2025-09-14T15:32:52.0018434Z with_sdl_ttf = None
2025-09-14T15:32:52.0018623Z 
2025-09-14T15:32:52.0018939Z     @pytest.mark.skipif(sdlttf.dll.version < 2018, reason="not available")
2025-09-14T15:32:52.0019297Z     def test_TTF_GlyphMetrics32(with_sdl_ttf):
2025-09-14T15:32:52.0019604Z         expected = {
2025-09-14T15:32:52.0019882Z             'A': [1, 25, 0, 29, 25],
2025-09-14T15:32:52.0020205Z             'j': [-3, 7, -9, 28, 9],
2025-09-14T15:32:52.0020495Z             '.': [2, 7, -1, 4, 8]
2025-09-14T15:32:52.0020760Z         }
2025-09-14T15:32:52.0021040Z         font = sdlttf.TTF_OpenFont(fontfile, 40)
2025-09-14T15:32:52.0021513Z         minX, maxX, minY, maxY = c_int(0), c_int(0), c_int(0), c_int(0)
2025-09-14T15:32:52.0021777Z         adv = c_int(0)
2025-09-14T15:32:52.0021998Z         for char in expected.keys():
2025-09-14T15:32:52.0022237Z             ret = sdlttf.TTF_GlyphMetrics32(
2025-09-14T15:32:52.0022460Z                 font, ord(char),
2025-09-14T15:32:52.0022716Z                 byref(minX), byref(maxX), byref(minY), byref(maxY), byref(adv)
2025-09-14T15:32:52.0022952Z             )
2025-09-14T15:32:52.0023183Z             results = [x.value for x in (minX, maxX, minY, maxY, adv)]
2025-09-14T15:32:52.0023560Z             assert sdlttf.TTF_GetError() == b""
2025-09-14T15:32:52.0023792Z             assert ret == 0
2025-09-14T15:32:52.0024010Z >           assert results == expected[char]
2025-09-14T15:32:52.0024251Z E           assert [-3, 7, -9, 29, 9] == [-3, 7, -9, 28, 9]
2025-09-14T15:32:52.0024448Z E             
2025-09-14T15:32:52.0024648Z E             At index 3 diff: 29 != 28
2025-09-14T15:32:52.0024851Z E             
2025-09-14T15:32:52.0025038Z E             Full diff:
2025-09-14T15:32:52.0025225Z E               [
2025-09-14T15:32:52.0025411Z E                   -3,
2025-09-14T15:32:52.0025598Z E                   7,
2025-09-14T15:32:52.0025784Z E                   -9,
2025-09-14T15:32:52.0025971Z E             -     28,
2025-09-14T15:32:52.0026152Z E             ?      ^
2025-09-14T15:32:52.0026314Z E             +     29,
2025-09-14T15:32:52.0026496Z E             ?      ^
2025-09-14T15:32:52.0026678Z E                   9,
2025-09-14T15:32:52.0026857Z E               ]
2025-09-14T15:32:52.0026957Z 
2025-09-14T15:32:52.0027130Z adv        = c_int(9)
2025-09-14T15:32:52.0027326Z char       = 'j'
2025-09-14T15:32:52.0027617Z expected   = {'.': [2, 7, -1, 4, 8], 'A': [1, 25, 0, 29, 25], 'j': [-3, 7, -9, 28, 9]}
2025-09-14T15:32:52.0027915Z font       = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e7f6fdd0>
2025-09-14T15:32:52.0028156Z maxX       = c_int(7)
2025-09-14T15:32:52.0028361Z maxY       = c_int(29)
2025-09-14T15:32:52.0028562Z minX       = c_int(-3)
2025-09-14T15:32:52.0028762Z minY       = c_int(-9)
2025-09-14T15:32:52.0028974Z results    = [-3, 7, -9, 29, 9]
2025-09-14T15:32:52.0029178Z ret        = 0
2025-09-14T15:32:52.0029376Z with_sdl_ttf = None
2025-09-14T15:32:52.0029475Z 
2025-09-14T15:32:52.0029929Z ../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.13/site-packages/sdl2/test/sdlttf_test.py:394: AssertionError
2025-09-14T15:32:52.0030838Z ______________________________ test_TTF_SizeText _______________________________
2025-09-14T15:32:52.0033411Z 
2025-09-14T15:32:52.0033832Z with_font = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e86eaed0>
2025-09-14T15:32:52.0033969Z 
2025-09-14T15:32:52.0034182Z     def test_TTF_SizeText(with_font):
2025-09-14T15:32:52.0034409Z         font = with_font
2025-09-14T15:32:52.0034650Z         min_expected_w = 69     # SDL2_ttf 2.0.18
2025-09-14T15:32:52.0034897Z         max_expected_w = 70     # SDL2_ttf <= 2.0.15
2025-09-14T15:32:52.0035162Z         min_expected_h = 21     # SDL2_ttf 2.0.15 with FreeType 2.10.1
2025-09-14T15:32:52.0035594Z         max_expected_h = 25     # SDL2_ttf < 2.0.15
2025-09-14T15:32:52.0035839Z         w, h = c_int(0), c_int(0)
2025-09-14T15:32:52.0036082Z         sdlttf.TTF_SizeText(font, b"Hi there!", byref(w), byref(h))
2025-09-14T15:32:52.0036344Z >       assert w.value >= min_expected_w
2025-09-14T15:32:52.0036559Z E       assert 67 >= 69
2025-09-14T15:32:52.0036779Z E        +  where 67 = c_int(67).value
2025-09-14T15:32:52.0036905Z 
2025-09-14T15:32:52.0037117Z font       = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e86eaed0>
2025-09-14T15:32:52.0037358Z h          = c_int(21)
2025-09-14T15:32:52.0037563Z max_expected_h = 25
2025-09-14T15:32:52.0037770Z max_expected_w = 70
2025-09-14T15:32:52.0037974Z min_expected_h = 21
2025-09-14T15:32:52.0038177Z min_expected_w = 69
2025-09-14T15:32:52.0038458Z w          = c_int(67)
2025-09-14T15:32:52.0038705Z with_font  = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e86eaed0>
2025-09-14T15:32:52.0038839Z 
2025-09-14T15:32:52.0039297Z ../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.13/site-packages/sdl2/test/sdlttf_test.py:405: AssertionError
2025-09-14T15:32:52.0039817Z ______________________________ test_TTF_SizeUTF8 _______________________________
2025-09-14T15:32:52.0039991Z 
2025-09-14T15:32:52.0040221Z with_font = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e7f6c5d0>
2025-09-14T15:32:52.0040355Z 
2025-09-14T15:32:52.0040558Z     def test_TTF_SizeUTF8(with_font):
2025-09-14T15:32:52.0040779Z         font = with_font
2025-09-14T15:32:52.0041000Z         min_expected_w = 72     # SDL2_ttf 2.0.18
2025-09-14T15:32:52.0041244Z         max_expected_w = 73     # SDL2_ttf <= 2.0.15
2025-09-14T15:32:52.0041511Z         min_expected_h = 21     # SDL2_ttf 2.0.15 with FreeType 2.10.1
2025-09-14T15:32:52.0041768Z         max_expected_h = 25     # SDL2_ttf < 2.0.15
2025-09-14T15:32:52.0041980Z         w, h = c_int(0), c_int(0)
2025-09-14T15:32:52.0042946Z         sdlttf.TTF_SizeUTF8(font, u"Hï thère!".encode('utf-8'), byref(w), byref(h))
2025-09-14T15:32:52.0043241Z >       assert w.value >= min_expected_w
2025-09-14T15:32:52.0043562Z E       assert 70 >= 72
2025-09-14T15:32:52.0043785Z E        +  where 70 = c_int(70).value
2025-09-14T15:32:52.0043904Z 
2025-09-14T15:32:52.0044118Z font       = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e7f6c5d0>
2025-09-14T15:32:52.0044359Z h          = c_int(22)
2025-09-14T15:32:52.0044560Z max_expected_h = 25
2025-09-14T15:32:52.0044764Z max_expected_w = 73
2025-09-14T15:32:52.0044963Z min_expected_h = 21
2025-09-14T15:32:52.0045164Z min_expected_w = 72
2025-09-14T15:32:52.0045362Z w          = c_int(70)
2025-09-14T15:32:52.0045604Z with_font  = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e7f6c5d0>
2025-09-14T15:32:52.0045746Z 
2025-09-14T15:32:52.0046204Z ../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.13/site-packages/sdl2/test/sdlttf_test.py:418: AssertionError
2025-09-14T15:32:52.0046747Z _____________________________ test_TTF_SizeUNICODE _____________________________
2025-09-14T15:32:52.0046920Z 
2025-09-14T15:32:52.0047149Z with_font = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e86e90d0>
2025-09-14T15:32:52.0047281Z 
2025-09-14T15:32:52.0047490Z     def test_TTF_SizeUNICODE(with_font):
2025-09-14T15:32:52.0047712Z         font = with_font
2025-09-14T15:32:52.0047934Z         min_expected_w = 69     # SDL2_ttf 2.0.18
2025-09-14T15:32:52.0048178Z         max_expected_w = 70     # SDL2_ttf <= 2.0.15
2025-09-14T15:32:52.0048441Z         min_expected_h = 21     # SDL2_ttf 2.0.15 with FreeType 2.10.1
2025-09-14T15:32:52.0048705Z         max_expected_h = 25     # SDL2_ttf < 2.0.15
2025-09-14T15:32:52.0048918Z         w, h = c_int(0), c_int(0)
2025-09-14T15:32:52.0049140Z         strarr = to_utf16(u"Hi there!")
2025-09-14T15:32:52.0049486Z         sdlttf.TTF_SizeUNICODE(font, strarr, byref(w), byref(h))
2025-09-14T15:32:52.0049741Z         # For debug purposes
2025-09-14T15:32:52.0049949Z         #print(list(strarr))
2025-09-14T15:32:52.0050180Z         #print("w = {0}, h = {1}".format(w.value, h.value))
2025-09-14T15:32:52.0050431Z >       assert w.value >= min_expected_w
2025-09-14T15:32:52.0050647Z E       assert 67 >= 69
2025-09-14T15:32:52.0050867Z E        +  where 67 = c_int(67).value
2025-09-14T15:32:52.0050977Z 
2025-09-14T15:32:52.0051205Z font       = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e86e90d0>
2025-09-14T15:32:52.0051450Z h          = c_int(21)
2025-09-14T15:32:52.0051650Z max_expected_h = 25
2025-09-14T15:32:52.0051855Z max_expected_w = 70
2025-09-14T15:32:52.0052059Z min_expected_h = 21
2025-09-14T15:32:52.0052328Z min_expected_w = 69
2025-09-14T15:32:52.0052575Z strarr     = <sdl2.test.sdlttf_test.c_ushort_Array_11 object at 0x7ff3e7f6d250>
2025-09-14T15:32:52.0052833Z w          = c_int(67)
2025-09-14T15:32:52.0053082Z with_font  = <sdl2.sdlttf.LP_TTF_Font object at 0x7ff3e86e90d0>
2025-09-14T15:32:52.0053232Z 
2025-09-14T15:32:52.0053756Z ../_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.13/site-packages/sdl2/test/sdlttf_test.py:435: AssertionError

the sethint stuff can be fixed by backporting py-sdl/py-sdl2#280 . All other failures seem to point to SDL_ttf, and I could not find this failures anywhere else, so that may be a packaging problem indeed.

@traversaro
Copy link

The ttf failures seems similar to py-sdl/py-sdl2#212, that may indicate that it is related to a change in version of freetype and/or harfbuzz.

@traversaro
Copy link

Indeed, I just checked without sdl2-compat, and the test failure are still there.

@traversaro
Copy link

The ttf failures seems similar to py-sdl/py-sdl2#212, that may indicate that it is related to a change in version of freetype and/or harfbuzz.

Indeed, using the freetype 2.13.3 the test pass.

@traversaro
Copy link

As the tests are just checking the exact value returned by tests, I think it make sense to just limit freetype to < 2.14.0 and report the test failures upstream.

@traversaro
Copy link

traversaro commented Sep 15, 2025

Ok, after constraining freetype version in #38, only a Windows and macOS failure remains:

_______________________ test_SDL_GetCurrentAudioDriver ________________________

with_sdl_audio = None

    def test_SDL_GetCurrentAudioDriver(with_sdl_audio):
        success = 0
        # Reset audio subsystem
        SDL_Quit()
        SDL_Init(0)
        for index in range(sdl2.SDL_GetNumAudioDrivers()):
            drivername = sdl2.SDL_GetAudioDriver(index)
            os.environ["SDL_AUDIODRIVER"] = drivername.decode("utf-8")
            # Certain drivers fail without bringing up the correct
            # return value, such as the esd, if it is not running.
            SDL_InitSubSystem(SDL_INIT_AUDIO)
            driver = sdl2.SDL_GetCurrentAudioDriver()
            SDL_QuitSubSystem(SDL_INIT_AUDIO)
            # Do not handle wrong return values.
            if driver is not None:
>               assert drivername == driver
E               AssertionError: assert b'wasapi' == b'dummy'
E                 
E                 At index 0 diff: b'w' != b'd'
E                 
E                 Full diff:
E                 - (b'dummy')
E                 + (b'wasapi')

driver     = b'dummy'
drivername = b'wasapi'
index      = 0
success    = 0
with_sdl_audio = None

..\_test_env\lib\site-packages\sdl2\test\audio_test.py:218: AssertionError

This may be indeed another sdl2-compat regression, if Windows-only it may not be catched by Linux distro tests.

@traversaro
Copy link

traversaro commented Sep 15, 2025

Interestingly, the failure is similar to the one reported by Fedora in https://bugzilla.redhat.com/show_bug.cgi?id=2339020#c3 , but we do not have this failure on Linux.

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.

4 participants