(
self, code: str, proj_path: Path, args: Iterable[str] = ()
)
| 12 | |
| 13 | class TestCrawlCommand(TestProjectBase): |
| 14 | def crawl( |
| 15 | self, code: str, proj_path: Path, args: Iterable[str] = () |
| 16 | ) -> tuple[int, str, str]: |
| 17 | (proj_path / self.project_name / "spiders" / "myspider.py").write_text( |
| 18 | code, encoding="utf-8" |
| 19 | ) |
| 20 | return proc("crawl", "myspider", *args, cwd=proj_path) |
| 21 | |
| 22 | def get_log(self, code: str, proj_path: Path, args: Iterable[str] = ()) -> str: |
| 23 | _, _, stderr = self.crawl(code, proj_path, args=args) |
no test coverage detected