mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-21 21:39:33 +00:00
Tests can skip by exiting with 99; fix eigen test failure
This allows (and changes the current examples) to exit with status 99 to
skip a test instead of outputting a special string ("NumPy missing").
This also fixes the eigen test, which currently fails when eigen
headers are available but NumPy is not, to skip instead of failing when
NumPy isn't available.
This commit is contained in:
@@ -11,7 +11,11 @@ from example import sparse_r, sparse_c
|
||||
from example import sparse_passthrough_r, sparse_passthrough_c
|
||||
from example import double_row, double_col
|
||||
from example import double_mat_cm, double_mat_rm
|
||||
import numpy as np
|
||||
try:
|
||||
import numpy as np
|
||||
except ImportError:
|
||||
# NumPy missing: skip test
|
||||
exit(99)
|
||||
|
||||
ref = np.array(
|
||||
[[0, 3, 0, 0, 0, 11],
|
||||
|
||||
Reference in New Issue
Block a user