From b06741b9f7a757de2a0eff3cf7a3ce30eb2ddc8e Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Fri, 17 Oct 2025 11:45:22 -0700 Subject: [PATCH 1/2] MAINT: Remove aliased import. --- numpydoc/tests/test_docscrape.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/numpydoc/tests/test_docscrape.py b/numpydoc/tests/test_docscrape.py index cf7c0de9..fb497e3d 100644 --- a/numpydoc/tests/test_docscrape.py +++ b/numpydoc/tests/test_docscrape.py @@ -6,7 +6,6 @@ import jinja2 import pytest -from pytest import warns as assert_warns from numpydoc.docscrape import ClassDoc, FunctionDoc, NumpyDocString from numpydoc.docscrape_sphinx import ( @@ -907,7 +906,7 @@ class Dummy: def test_see_also_trailing_comma_warning(): warnings.filterwarnings("error") - with assert_warns( + with pytest.warns( Warning, match="Unexpected comma or period after function list at index 43 of line .*", ): From 9270ac08d33b3cd323145859d0c747c365f30aa1 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Fri, 17 Oct 2025 11:51:35 -0700 Subject: [PATCH 2/2] TST: Fix no-op test. --- numpydoc/tests/test_docscrape.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/numpydoc/tests/test_docscrape.py b/numpydoc/tests/test_docscrape.py index fb497e3d..acf5194c 100644 --- a/numpydoc/tests/test_docscrape.py +++ b/numpydoc/tests/test_docscrape.py @@ -999,13 +999,12 @@ def test_trailing_colon(): def test_no_summary(): - str( - SphinxDocString( - """ - Parameters - ----------""" - ) + ds = SphinxDocString( + """ + Parameters + ----------""" ) + assert ds["Summary"] == [""] def test_unicode():