Skip to content

Commit ef487d9

Browse files
gfyoungTomAugspurger
authored andcommitted
DOC: Remove preference for pytest paradigm in assert_raises_regex (#16518)
1 parent 6649157 commit ef487d9

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pandas/util/testing.py

+2-9
Original file line numberDiff line numberDiff line change
@@ -2424,15 +2424,8 @@ def assert_raises_regex(_exception, _regexp, _callable=None,
24242424
Check that the specified Exception is raised and that the error message
24252425
matches a given regular expression pattern. This may be a regular
24262426
expression object or a string containing a regular expression suitable
2427-
for use by `re.search()`.
2428-
2429-
This is a port of the `assertRaisesRegexp` function from unittest in
2430-
Python 2.7. However, with our migration to `pytest`, please refrain
2431-
from using this. Instead, use the following paradigm:
2432-
2433-
with pytest.raises(_exception) as exc_info:
2434-
func(*args, **kwargs)
2435-
exc_info.matches(reg_exp)
2427+
for use by `re.search()`. This is a port of the `assertRaisesRegexp`
2428+
function from unittest in Python 2.7.
24362429
24372430
Examples
24382431
--------

0 commit comments

Comments
 (0)