From dd8aa7237b88569c99e85b300b0cf537aeaebfbd Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sun, 24 Oct 2021 13:26:39 -0400 Subject: Used a warning to formally deprecate the 'text' argument in favor of 'string'. --- bs4/tests/test_navigablestring.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bs4/tests/test_navigablestring.py') diff --git a/bs4/tests/test_navigablestring.py b/bs4/tests/test_navigablestring.py index 649acc0..e4c179e 100644 --- a/bs4/tests/test_navigablestring.py +++ b/bs4/tests/test_navigablestring.py @@ -64,7 +64,7 @@ class TestNavigableStringSubclasses(SoupTest): cdata = CData("foo") soup.insert(1, cdata) assert str(soup) == "" - assert soup.find(text="foo") == "foo" + assert soup.find(string="foo") == "foo" assert soup.contents[0] == "foo" def test_cdata_is_never_formatted(self): @@ -103,7 +103,7 @@ class TestNavigableStringSubclasses(SoupTest): "
text
" ) assert [NavigableString, Script, Stylesheet] == [ - x.__class__ for x in soup.find_all(text=True) + x.__class__ for x in soup.find_all(string=True) ] # The TemplateString is a little unusual because it's generally found -- cgit v1.2.3