mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
Added the print_error not called check in the test_cmd_web_imports_playwright
method.
This commit is contained in:
parent
f99dbc2c43
commit
44376ee382
1 changed files with 7 additions and 0 deletions
|
@ -13,6 +13,10 @@ class TestScrape(unittest.TestCase):
|
|||
self.commands = Commands(self.io, None)
|
||||
|
||||
def test_cmd_web_imports_playwright(self):
|
||||
# Create a mock print_error function
|
||||
mock_print_error = MagicMock()
|
||||
self.commands.io.tool_error = mock_print_error
|
||||
|
||||
# Run the cmd_web command
|
||||
result = self.commands.cmd_web("https://example.com")
|
||||
|
||||
|
@ -33,6 +37,9 @@ class TestScrape(unittest.TestCase):
|
|||
playwright_imported, "Playwright should be importable after running cmd_web"
|
||||
)
|
||||
|
||||
# Assert that print_error was never called
|
||||
mock_print_error.assert_not_called()
|
||||
|
||||
def test_scrape_actual_url_with_playwright(self):
|
||||
# Create a Scraper instance with a mock print_error function
|
||||
mock_print_error = MagicMock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue