Ensure import pybind11_tests traceback is shown. (#4455)

This commit is contained in:
Ralf W. Grosse-Kunstleve 2023-01-14 13:47:56 -08:00 committed by Henry Schreiner
parent f14bb03d15
commit 4f6183cfe2

View File

@ -11,11 +11,17 @@ import multiprocessing
import os import os
import re import re
import textwrap import textwrap
import traceback
import pytest import pytest
# Early diagnostic for failed imports # Early diagnostic for failed imports
import pybind11_tests try:
import pybind11_tests
except Exception:
# pytest does not show the traceback without this.
traceback.print_exc()
raise
@pytest.fixture(scope="session", autouse=True) @pytest.fixture(scope="session", autouse=True)