Test that lazy_load raises AttributeError if the scraping method for an invalid backend is missing.
(monkeypatch)
| 1022 | |
| 1023 | @pytest.mark.asyncio |
| 1024 | async def test_lazy_load_invalid_backend(monkeypatch): |
| 1025 | """Test that lazy_load raises AttributeError if the scraping method for an invalid backend is missing.""" |
| 1026 | # Create a loader instance with a backend that does not have a corresponding scraping method. |
| 1027 | loader = ChromiumLoader(["http://example.com"], backend="nonexistent") |
| 1028 | with pytest.raises(AttributeError): |
| 1029 | # lazy_load calls asyncio.run(scraping_fn(url)) for each URL. |
| 1030 | list(loader.lazy_load()) |
| 1031 | |
| 1032 | |
| 1033 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected