MCPcopy Create free account
hub / github.com/apify/crawlee-python / test_retire_method

Function test_retire_method

tests/unit/sessions/test_session.py:83–89  ·  view source on GitHub ↗

Test that retire method properly sets the session as unusable.

(session: Session)

Source from the content-addressed store, hash-verified

81
82
83def test_retire_method(session: Session) -> None:
84 """Test that retire method properly sets the session as unusable."""
85 initial_usage_count = session.usage_count
86 session.retire()
87 assert not session.is_usable
88 assert session.error_score == 3.0
89 assert session.usage_count == initial_usage_count
90
91
92def test_mark_good_at_usage_limit_no_double_increment() -> None:

Callers

nothing calls this directly

Calls 1

retireMethod · 0.80

Tested by

no test coverage detected