🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-08 08:11:38 | PHP 8.2.32
📂
/ (Root)
/
opt
/
alt
/
python38
/
lib
/
python3.8
/
site-packages
/
reactivex
/
testing
/
__pycache__
📍 /opt/alt/python38/lib/python3.8/site-packages/reactivex/testing/__pycache__
🔄 Refresh
✏️
Editing: testscheduler.cpython-38.pyc
Read Only
U v�i� � @ s� d dl mZmZmZmZmZmZmZ d dlZd dlm Z m Z m Z d dlmZ d dl mZ d dlmZ ddlmZ dd lmZ dd lmZ ddlmZ ed�ZG d d� de�ZdS )� )�Any�Callable�List�Optional�TypeVar�Union�castN)� Observable�abc�typing)� Disposable)�VirtualTimeScheduler)�Recorded� )�ColdObservable)� HotObservable��MockObserver)�ReactiveTest�_Tc s� e Zd ZdZdZdejeje ee j d�� fdd� Zdee g ee f ee ee ee ee d�� fdd � Zeee eee f ee d �dd�Zeee eee f ee d �d d�Zee d�dd�Z� ZS )� TestSchedulerz�Test time scheduler used for testing applications and libraries built using Reactive Extensions. All time, both absolute and relative is specified as integer ticksFN)�duetime�action�state�returnc s( t |t�r|n| �|�}t� �|||�S )a� Schedules an action to be executed at the specified virtual time. Args: duetime: Absolute virtual time at which to execute the action. action: Action to be executed. state: State passed to the action to be executed. Returns: Disposable object used to cancel the scheduled action (best effort). )� isinstance�floatZ to_seconds�super�schedule_absolute)�selfr r r �� __class__� �P/opt/alt/python38/lib/python3.8/site-packages/reactivex/testing/testscheduler.pyr s zTestScheduler.schedule_absolute)�create�created� subscribed�disposedr c s� |pt j}|pt j}|pt j}| �� �d�d�d tjttjd�� �fdd� }| � ||� d tjttjd����fdd� }| � ||� dtjttjd��fdd� }| � ||� t � �� �S )a$ Starts the test scheduler and uses the specified virtual times to invoke the factory function, subscribe to the resulting sequence, and dispose the subscription. Args: create: Factory method to create an observable sequence. created: Virtual time at which to invoke the factory to create an observable sequence. subscribed: Virtual time at which to subscribe to the created observable sequence. disposed: Virtual time at which to dispose the subscription. Returns: Observer with timestamped recordings of notification messages that were received during the virtual time window when the subscription to the source sequence was active. N)� schedulerr r c s � dk r� � nt �� �t� S )z&Called at create time. Defaults to 100N)� reactivex�neverr �r( r )r$ �sourcer"