Skip to content

✅ Fix broken sdl2 mixer test#2987

Merged
AndreMiras merged 1 commit into
kivy:developfrom
AndreMiras:feature/test_sdl2_mixer
Mar 7, 2024
Merged

✅ Fix broken sdl2 mixer test#2987
AndreMiras merged 1 commit into
kivy:developfrom
AndreMiras:feature/test_sdl2_mixer

Conversation

@AndreMiras

Copy link
Copy Markdown
Member

Reproduce with:

PYTHONPATH=. pytest tests/recipes/test_sdl2_mixer.py

The error was:

=================================== FAILURES ===================================
__________________ TestSDL2MixerRecipe.test_get_include_dirs ___________________
self = <test_sdl2_mixer.TestSDL2MixerRecipe testMethod=test_get_include_dirs>
    def test_get_include_dirs(self):
>       list_of_includes = self.recipe.get_include_dirs(self.arch)
tests/recipes/test_sdl2_mixer.py:12:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pythonforandroid/recipes/sdl2_mixer/__init__.py:13: in get_include_dirs
    os.path.join(self.ctx.bootstrap.build_dir, "jni", "SDL2_mixer", "include")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
a = None, p = ('jni', 'SDL2_mixer', 'include')
>   ???
E   TypeError: expected str, bytes or os.PathLike object, not NoneType
<frozen posixpath>:76: TypeError

Also do some minor code clean up and absolute import path fixes.

Reproduce with:
```
PYTHONPATH=. pytest tests/recipes/test_sdl2_mixer.py
```
The error was:
```
=================================== FAILURES ===================================
__________________ TestSDL2MixerRecipe.test_get_include_dirs ___________________
self = <test_sdl2_mixer.TestSDL2MixerRecipe testMethod=test_get_include_dirs>
    def test_get_include_dirs(self):
>       list_of_includes = self.recipe.get_include_dirs(self.arch)
tests/recipes/test_sdl2_mixer.py:12:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pythonforandroid/recipes/sdl2_mixer/__init__.py:13: in get_include_dirs
    os.path.join(self.ctx.bootstrap.build_dir, "jni", "SDL2_mixer", "include")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
a = None, p = ('jni', 'SDL2_mixer', 'include')
>   ???
E   TypeError: expected str, bytes or os.PathLike object, not NoneType
<frozen posixpath>:76: TypeError
```

Also do some minor code clean up and absolute import path fixes.
@AndreMiras AndreMiras merged commit 8eacdc0 into kivy:develop Mar 7, 2024
@AndreMiras AndreMiras deleted the feature/test_sdl2_mixer branch March 7, 2024 20:57
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.

1 participant