MCPcopy
hub / github.com/pandas-dev/pandas / external_error_raised

Function external_error_raised

pandas/_testing/__init__.py:378–394  ·  view source on GitHub ↗

Helper function to mark pytest.raises that have an external error message. Parameters ---------- expected_exception : Exception Expected error to raise. Returns ------- Callable Regular `pytest.raises` function with `match` equal to `None`.

(expected_exception: type[Exception])

Source from the content-addressed store, hash-verified

376
377
378def external_error_raised(expected_exception: type[Exception]) -> ContextManager:
379 """
380 Helper function to mark pytest.raises that have an external error message.
381
382 Parameters
383 ----------
384 expected_exception : Exception
385 Expected error to raise.
386
387 Returns
388 -------
389 Callable
390 Regular `pytest.raises` function with `match` equal to `None`.
391 """
392 import pytest
393
394 return pytest.raises(expected_exception, match=None)
395
396
397def get_cython_table_params(ndframe, func_names_and_expected):

Callers

nothing calls this directly

Calls 1

raisesMethod · 0.45

Tested by

no test coverage detected