Skip to content

Commit 5bc0943

Browse files
authored
Ensure config, build, toolchain, spelling, etc. issues are not masked. (#4255)
1 parent b07d08f commit 5bc0943

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

include/pybind11/eigen/matrix.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include "../numpy.h"
1313

14-
// Similar to comments & pragma block in eigen_tensor.h. PLEASE KEEP IN SYNC.
1514
/* HINT: To suppress warnings originating from the Eigen headers, use -isystem.
1615
See also:
1716
https://stackoverflow.com/questions/2579576/i-dir-vs-isystem-dir

tests/test_eigen_tensor.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@
99
from pybind11_tests import eigen_tensor_avoid_stl_array as avoid
1010

1111
submodules += [avoid.c_style, avoid.f_style]
12-
except ImportError:
13-
pass
12+
except ImportError as e:
13+
# Ensure config, build, toolchain, etc. issues are not masked here:
14+
raise RuntimeError(
15+
"import pybind11_tests.eigen_tensor_avoid_stl_array FAILED, while "
16+
"import pybind11_tests.eigen_tensor succeeded. "
17+
"Please ensure that "
18+
"test_eigen_tensor.cpp & "
19+
"test_eigen_tensor_avoid_stl_array.cpp "
20+
"are built together (or both are not built if Eigen is not available)."
21+
) from e
1422

1523
tensor_ref = np.empty((3, 5, 2), dtype=np.int64)
1624

0 commit comments

Comments
 (0)