mirror of https://github.com/scrapy/scrapy.git
Fix typing.
This commit is contained in:
parent
8e112e3735
commit
b880825165
|
|
@ -159,7 +159,9 @@ class TestInteractiveShell:
|
|||
p.expect_exact("HtmlResponse")
|
||||
p.sendeof()
|
||||
p.wait() # type: ignore[no-untyped-call]
|
||||
p.proc.stdin.close()
|
||||
p.proc.stdout.close()
|
||||
if p.proc.stdin:
|
||||
p.proc.stdin.close()
|
||||
if p.proc.stdout:
|
||||
p.proc.stdout.close()
|
||||
logfile.seek(0)
|
||||
assert "Traceback" not in logfile.read().decode()
|
||||
|
|
|
|||
|
|
@ -215,8 +215,10 @@ class TestCrawlerProcessSubprocessBase(ScriptRunnerMixin):
|
|||
p.expect_exact("shutting down gracefully")
|
||||
p.expect_exact("Spider closed (shutdown)")
|
||||
p.wait() # type: ignore[no-untyped-call]
|
||||
p.proc.stdin.close()
|
||||
p.proc.stdout.close()
|
||||
if p.proc.stdin:
|
||||
p.proc.stdin.close()
|
||||
if p.proc.stdout:
|
||||
p.proc.stdout.close()
|
||||
|
||||
def test_shutdown_graceful(self) -> None:
|
||||
self._test_shutdown_graceful()
|
||||
|
|
@ -234,8 +236,10 @@ class TestCrawlerProcessSubprocessBase(ScriptRunnerMixin):
|
|||
p.kill(sig)
|
||||
p.expect_exact("forcing unclean shutdown")
|
||||
p.wait() # type: ignore[no-untyped-call]
|
||||
p.proc.stdin.close()
|
||||
p.proc.stdout.close()
|
||||
if p.proc.stdin:
|
||||
p.proc.stdin.close()
|
||||
if p.proc.stdout:
|
||||
p.proc.stdout.close()
|
||||
|
||||
@coroutine_test
|
||||
async def test_shutdown_forced(self) -> None:
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ def _get_console_and_portal(
|
|||
console = TelnetConsole(crawler)
|
||||
|
||||
# This function has some side effects we don't need for this test
|
||||
console._get_telnet_vars = dict
|
||||
console._get_telnet_vars = dict # type: ignore[method-assign]
|
||||
|
||||
console.start_listening()
|
||||
protocol = console.protocol()
|
||||
|
|
|
|||
Loading…
Reference in New Issue