Skip to content

Commit e5274c2

Browse files
committed
Use 'find_all' not 'findAll'
1 parent 4471ce1 commit e5274c2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/test_directive.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,19 +190,19 @@ def _do_test_directive(
190190

191191
div_count = 0
192192

193-
for div in page.findAll("div"):
193+
for div in page.find_all("div"):
194194
if not div.get("id", '').startswith("extras_require"):
195195
continue
196196

197-
assert div.findAll('p')[0].contents == ["Attention"]
198-
assert div.findAll('p')[0]["class"] == ["admonition-title"]
199-
assert div.findAll('p')[1].contents == ["This module has the following additional requirements:"]
197+
assert div.find_all('p')[0].contents == ["Attention"]
198+
assert div.find_all('p')[0]["class"] == ["admonition-title"]
199+
assert div.find_all('p')[1].contents == ["This module has the following additional requirements:"]
200200

201201
assert div.div["class"] == ["highlight-text", "notranslate"]
202202
assert div.div.div["class"] == ["highlight"]
203203
assert div.div.div.pre.contents[1:] == ['\n'.join(requirements) + '\n']
204204

205-
assert div.findAll('p')[2].contents == ["These can be installed as follows:"]
205+
assert div.find_all('p')[2].contents == ["These can be installed as follows:"]
206206

207207
assert div.blockquote.div.div["class"] == ["highlight-default", "notranslate"]
208208
assert div.blockquote.div.div.div["class"] == ["highlight"]
@@ -241,7 +241,7 @@ def _do_test_directive(
241241
)
242242
def test_output(page: BeautifulSoup, html_regression: HTMLRegressionFixture) -> None:
243243

244-
for div in page.findAll("script"):
244+
for div in page.find_all("script"):
245245
if div.get("src"):
246246
div["src"] = div["src"].split("?v=")[0]
247247
print(div["src"])
@@ -259,10 +259,10 @@ def test_no_requirements_demo(
259259
assert "No Requirements Demo" == title
260260

261261
# Now test the directive
262-
for div in page.findAll("div"):
262+
for div in page.find_all("div"):
263263
assert not div.get("id", '').startswith("extras_require")
264264

265-
for div in page.findAll("script"):
265+
for div in page.find_all("script"):
266266
if div.get("src"):
267267
div["src"] = div["src"].split("?v=")[0]
268268
print(div["src"])

0 commit comments

Comments
 (0)