MCPcopy
hub / github.com/impira/docquery / test_readme_file

Function test_readme_file

tests/test_web_driver.py:10–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9
10def test_readme_file():
11 driver = get_webdriver()
12 driver.get("https://github.com/impira/docquery/blob/ef73fa7e8069773ace03efae2254f3a510a814ef/README.md")
13 word_boxes = driver.find_word_boxes()
14
15 # This sanity checks the logic that merges word boxes
16 assert len(word_boxes["word_boxes"]) > 20, "Expect multiple word boxes"
17
18 # Make sure the last screenshot is shorter than the previous ones
19 _, screenshots = driver.scroll_and_screenshot()
20 assert len(screenshots) > 1, "Expect multiple pages"
21 assert (
22 screenshots[0].size[1] - screenshots[-1].size[1] > 10
23 ), "Expect the last page to be shorter than the first several"

Callers

nothing calls this directly

Calls 4

get_webdriverFunction · 0.90
getMethod · 0.80
find_word_boxesMethod · 0.80
scroll_and_screenshotMethod · 0.80

Tested by

no test coverage detected