diff options
author | Leonard Richardson <leonardr@segfault.org> | 2021-10-24 13:26:39 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2021-10-24 13:26:39 -0400 |
commit | dd8aa7237b88569c99e85b300b0cf537aeaebfbd (patch) | |
tree | a6923b9558dab70df4de12ccbef0e0612ad909a6 /bs4/tests/test_navigablestring.py | |
parent | f7ec284182f3e78974fcdc7b62c88a5c3a6dbbbd (diff) |
Used a warning to formally deprecate the 'text' argument in favor of 'string'.
Diffstat (limited to 'bs4/tests/test_navigablestring.py')
-rw-r--r-- | bs4/tests/test_navigablestring.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) == "<![CDATA[foo]]>" - 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): "<div>text</div><script>text</script><style>text</style>" ) 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 |