Просмотр исходного кода

tests: Add xfail test for loading a missing audio file

Sam Edwards 8 лет назад
Родитель
Сommit
bc88566906
2 измененных файлов с 12 добавлено и 0 удалено
  1. 6 0
      tests/audio/conftest.py
  2. 6 0
      tests/audio/test_loading.py

+ 6 - 0
tests/audio/conftest.py

@@ -0,0 +1,6 @@
+import pytest
+from panda3d.core import *
+
[email protected](scope='module')
+def audiomgr():
+    return AudioManager.create_AudioManager()

+ 6 - 0
tests/audio/test_loading.py

@@ -0,0 +1,6 @@
+import pytest
+
[email protected]
+def test_missing_file(audiomgr):
+    sound = audiomgr.get_sound('/not/a/valid/file.ogg')
+    assert sound is None