MCPcopy
hub / github.com/scrapy/scrapy / test_no_peek_raises

Method test_no_peek_raises

tests/test_pqueues.py:131–139  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

129 assert self.queue.pop() is None
130
131 def test_no_peek_raises(self):
132 if hasattr(queuelib.queue.FifoMemoryQueue, "peek"):
133 pytest.skip("queuelib.queue.FifoMemoryQueue.peek is defined")
134 self.queue.push(Request("https://example.org"))
135 with pytest.raises(
136 NotImplementedError,
137 match="The underlying queue class does not implement 'peek'",
138 ):
139 self.queue.peek()
140
141 def test_peek(self):
142 if not hasattr(queuelib.queue.FifoMemoryQueue, "peek"):

Callers

nothing calls this directly

Calls 3

RequestClass · 0.90
pushMethod · 0.45
peekMethod · 0.45

Tested by

no test coverage detected