From 1cb2554c487434bae161dfdeca4a82f1ec9c41c2 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 2 Aug 2023 16:36:04 +0200 Subject: [PATCH] tests: Test that tools run when testing wheels Intended to catch issues like #1504 --- tests/test_tools.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/test_tools.py diff --git a/tests/test_tools.py b/tests/test_tools.py new file mode 100644 index 0000000000..a6dfa6d441 --- /dev/null +++ b/tests/test_tools.py @@ -0,0 +1,19 @@ +import pytest +import subprocess + +# Currently only works when Panda was installed from wheel +panda3d_tools = pytest.importorskip("panda3d_tools") + + +@pytest.mark.skipif(not hasattr(panda3d_tools, 'bam_info'), + reason="requires bam-info") +def test_bam_info(): + output = subprocess.check_output(['bam-info', '-h'], stderr=subprocess.STDOUT).strip() + assert output.startswith(b"This program scans one or more Bam files") + + +@pytest.mark.skipif(not hasattr(panda3d_tools, 'pzip'), + reason="requires pzip") +def test_pzip(): + output = subprocess.check_output(['pzip', '-h'], stderr=subprocess.STDOUT).strip() + assert output.startswith(b"This program compresses the named file")