mirror of https://github.com/scrapy/scrapy.git
Close PopenSpawn stdin and stdout explicitly.
This commit is contained in:
parent
55b457f11d
commit
a54a8923ea
|
|
@ -159,5 +159,7 @@ class TestInteractiveShell:
|
|||
p.expect_exact("HtmlResponse")
|
||||
p.sendeof()
|
||||
p.wait() # type: ignore[no-untyped-call]
|
||||
p.proc.stdin.close()
|
||||
p.proc.stdout.close()
|
||||
logfile.seek(0)
|
||||
assert "Traceback" not in logfile.read().decode()
|
||||
|
|
|
|||
|
|
@ -215,6 +215,8 @@ 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()
|
||||
|
||||
def test_shutdown_graceful(self) -> None:
|
||||
self._test_shutdown_graceful()
|
||||
|
|
@ -232,6 +234,8 @@ 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()
|
||||
|
||||
@coroutine_test
|
||||
async def test_shutdown_forced(self) -> None:
|
||||
|
|
|
|||
Loading…
Reference in New Issue