From bc88566906f80b49fc93cdbdf107189d3d96c606 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Mon, 19 Feb 2018 19:15:02 -0700 Subject: [PATCH] tests: Add xfail test for loading a missing audio file --- tests/audio/conftest.py | 6 ++++++ tests/audio/test_loading.py | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/audio/conftest.py create mode 100644 tests/audio/test_loading.py diff --git a/tests/audio/conftest.py b/tests/audio/conftest.py new file mode 100644 index 0000000000..60636e6d6e --- /dev/null +++ b/tests/audio/conftest.py @@ -0,0 +1,6 @@ +import pytest +from panda3d.core import * + +@pytest.fixture(scope='module') +def audiomgr(): + return AudioManager.create_AudioManager() diff --git a/tests/audio/test_loading.py b/tests/audio/test_loading.py new file mode 100644 index 0000000000..ddbec1a1da --- /dev/null +++ b/tests/audio/test_loading.py @@ -0,0 +1,6 @@ +import pytest + +@pytest.mark.xfail +def test_missing_file(audiomgr): + sound = audiomgr.get_sound('/not/a/valid/file.ogg') + assert sound is None