Skip to content

Commit ccb2a51

Browse files
fix: Resolve bs4 deprecation warnings (#306)
Signed-off-by: Emmanuel Ferdman <[email protected]> Co-authored-by: Denis Blanchette <[email protected]>
1 parent b9eb474 commit ccb2a51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/generate_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def test_with_examples() -> None:
415415
assert examples_label_text == ["Examples:", "Example:", "Example:", "Example:"]
416416

417417
examples_content = soup.find_all("div", class_="examples")
418-
examples_content_text = [ex.findChildren()[0].text for ex in examples_content]
418+
examples_content_text = [ex.find_all()[0].text for ex in examples_content]
419419
assert examples_content_text == [
420420
'"Guido"\n',
421421
'"BDFL"\n',
@@ -437,7 +437,7 @@ def test_with_examples_as_yaml() -> None:
437437
assert examples_label_text == ["Examples:", "Example:", "Example:", "Example:"]
438438

439439
examples_content = soup.find_all("div", class_="examples")
440-
examples_content_text = [ex.findChildren()[0].text for ex in examples_content]
440+
examples_content_text = [ex.find_all()[0].text for ex in examples_content]
441441
assert (
442442
[
443443
"Guido\n",
@@ -478,7 +478,7 @@ def test_pattern_properties() -> None:
478478
assert pattern_label_text == ["Pattern Property"]
479479

480480
pattern_content = soup.find_all("span", class_="pattern-value")
481-
pattern_content_text = [ex.findChildren()[0].text for ex in pattern_content]
481+
pattern_content_text = [ex.find_all()[0].text for ex in pattern_content]
482482
assert pattern_content_text == ["$[a-c][0-9]^"]
483483

484484
tests.html_schema_doc_asserts.assert_property_names(
@@ -506,7 +506,7 @@ def test_pattern_properties_html_id() -> None:
506506
assert pattern_label_text == ["Pattern Property"] * 4
507507

508508
pattern_content = soup.find_all("span", class_="pattern-value")
509-
pattern_content_text = [ex.findChildren()[0].text for ex in pattern_content]
509+
pattern_content_text = [ex.find_all()[0].text for ex in pattern_content]
510510
assert pattern_content_text == [".$", ".*", "..", "^."]
511511

512512
tests.html_schema_doc_asserts.assert_property_names(

0 commit comments

Comments
 (0)