MCPcopy
hub / github.com/reflex-dev/reflex / expect

Method expect

reflex/testing.py:781–797  ·  view source on GitHub ↗

Expect a target callable to return a truthy value within the timeout. Args: target: callable that returns truthy if polling condition is met. timeout: max polling time step: interval between checking target()

(
        target: Callable[[], T],
        timeout: TimeoutType = None,
        step: TimeoutType = None,
    )

Source from the content-addressed store, hash-verified

779
780 @staticmethod
781 def expect(
782 target: Callable[[], T],
783 timeout: TimeoutType = None,
784 step: TimeoutType = None,
785 ):
786 """Expect a target callable to return a truthy value within the timeout.
787
788 Args:
789 target: callable that returns truthy if polling condition is met.
790 timeout: max polling time
791 step: interval between checking target()
792 """
793 AppHarness.poll_for_or_raise_timeout(
794 target=target,
795 timeout=timeout,
796 step=step,
797 )
798
799
800class AppHarnessProd(AppHarness):

Callers 15

test_upload_fileFunction · 0.80
test_cancel_uploadFunction · 0.80
test_upload_chunk_fileFunction · 0.80
test_login_flowFunction · 0.80
test_iconsFunction · 0.80
test_connection_bannerFunction · 0.80
test_cloud_bannerFunction · 0.80
test_background_taskFunction · 0.80
test_get_stateFunction · 0.80

Calls 1

Tested by

no test coverage detected