diff --git a/tests/spiders/test_spider.py b/tests/spiders/test_spider.py index c1edaed..b01ee47 100644 --- a/tests/spiders/test_spider.py +++ b/tests/spiders/test_spider.py @@ -443,20 +443,12 @@ class TestSpiderHooks: class TestSpiderPause: """Test Spider pause functionality.""" - def test_pause_without_crawldir_raises(self): - """Test that pause without crawldir raises RuntimeError.""" - spider = ConcreteSpider() - - with pytest.raises(RuntimeError, match="Cannot pause without crawldir"): - spider.pause() - def test_pause_without_engine_raises(self): """Test that pause without active engine raises RuntimeError.""" - with tempfile.TemporaryDirectory() as tmpdir: - spider = ConcreteSpider(crawldir=tmpdir) + spider = ConcreteSpider() - with pytest.raises(RuntimeError, match="no crawl engine started"): - spider.pause() + with pytest.raises(RuntimeError, match="No active crawl to stop"): + spider.pause() class TestSpiderStats: