Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Use SIGINT instead of SIGTERM to support Windows.

Andrey Rakhmatullineb5e2e79ba8d
diff --git a/tests/test_crawler.py b/tests/test_crawler.py
index f0a308d95..b43a5826c 100644
--- a/tests/test_crawler.py
+++ b/tests/test_crawler.py
@@ -528,7 +528,7 @@ class CrawlerProcessSubprocess(ScriptRunnerMixin, unittest.TestCase):
p = PopenSpawn(args, timeout=5)
p.expect_exact("Spider opened")
p.expect_exact("Crawled (200)")
- p.kill(signal.SIGTERM)
+ p.kill(signal.SIGINT)
p.expect_exact("shutting down gracefully")
p.expect_exact("Spider closed (shutdown)")
p.wait()
@@ -538,9 +538,9 @@ class CrawlerProcessSubprocess(ScriptRunnerMixin, unittest.TestCase):
p = PopenSpawn(args, timeout=5)
p.expect_exact("Spider opened")
p.expect_exact("Crawled (200)")
- p.kill(signal.SIGTERM)
+ p.kill(signal.SIGINT)
p.expect_exact("shutting down gracefully")
- p.kill(signal.SIGTERM)
+ p.kill(signal.SIGINT)
p.expect_exact("forcing unclean shutdown")
p.wait()