diff --git a/src/apify/log.py b/src/apify/log.py index e1f29400..698474f6 100644 --- a/src/apify/log.py +++ b/src/apify/log.py @@ -17,7 +17,7 @@ @ignore_docs -class ActorLogFormatter(CrawleeLogFormatter): # noqa: D101 Inherited from parent class +class ActorLogFormatter(CrawleeLogFormatter): # noqa: D101 (Inherited from parent class) pass diff --git a/tests/unit/test_platform_event_manager.py b/tests/unit/test_platform_event_manager.py index 608da886..abf671bb 100644 --- a/tests/unit/test_platform_event_manager.py +++ b/tests/unit/test_platform_event_manager.py @@ -75,24 +75,24 @@ def event_handler(data: Any) -> None: dummy_persist_state = Mock() - # Test that they all work, and that they're called in order + # Test that they all work event_manager.emit(event=Event.PERSIST_STATE, event_data=dummy_persist_state) await asyncio.sleep(0.1) - assert event_calls[Event.PERSIST_STATE] == [ + assert set(event_calls[Event.PERSIST_STATE]) == { (1, dummy_persist_state), (2, dummy_persist_state), (3, dummy_persist_state), - ] + } event_calls[Event.PERSIST_STATE].clear() # Test that if you remove one, the others stay event_manager.off(event=Event.PERSIST_STATE, listener=handler_persist_state_3) event_manager.emit(event=Event.PERSIST_STATE, event_data=dummy_persist_state) await asyncio.sleep(0.1) - assert event_calls[Event.PERSIST_STATE] == [ + assert set(event_calls[Event.PERSIST_STATE]) == { (1, dummy_persist_state), (2, dummy_persist_state), - ] + } event_calls[Event.PERSIST_STATE].clear() # Test that removing all in bulk works