403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_sched.cpython-36.pyc
3

�w2_y�@s~ddlZddlZddlZddlZyddlZWnek
rDdZYnXdZGdd�d�ZGdd�dej�Ze	dkrzej
�dS)�N�
c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�TimercCstj�|_d|_d|_dS)Nr)�	threadingZ	Condition�_cond�_time�_stop)�self�r	�4/opt/alt/python36/lib64/python3.6/test/test_sched.py�__init__s
zTimer.__init__c	Cs|j�|jSQRXdS)N)rr)rr	r	r
�timesz
Timer.timec	CsT|dkst�|j�8||j7}x |j|kr>|j|_|jj�q W||_WdQRXdS)Nr)�AssertionErrorrrr�wait)r�tr	r	r
�sleeps
zTimer.sleepc
Cs:|dkst�|j�|j|7_|jj�WdQRXdS)Nr)r
rrZ
notify_all)rrr	r	r
�advance"sz
Timer.advanceN)�__name__�
__module__�__qualname__rrrrr	r	r	r
r
s
rc@steZdZdd�Zdd�Zejed�dd��Zdd	�Z	d
d�Z
ejed�dd
��Zdd�Zdd�Z
dd�Zdd�ZdS)�TestCasecsbg��fdd�}tjtjtj�}xd	D]}|j|d||f�}q&W|j�|j�dddddg�dS)
Ncs
�j|�S)N)�append)�x)�lr	r
�<lambda>-sz%TestCase.test_enter.<locals>.<lambda>��?皙�����?�333333�?皙�����?皙�����?�)rrrrr)�sched�	schedulerrr�enter�run�assertEqual)r�funr!r�zr	)rr
�
test_enter+s
zTestCase.test_entercsbg��fdd�}tjtjtj�}xd	D]}|j|d||f�}q&W|j�|j�dddddg�dS)
Ncs
�j|�S)N)r)r)rr	r
r6sz(TestCase.test_enterabs.<locals>.<lambda>皙�����?�{�G�z�?���Q��?�{�G�z�?�{�G�z�?r)r(r)r*r+r,)r r!rr�enterabsr#r$)rr%r!rr&r	)rr
�
test_enterabs4s
zTestCase.test_enterabsz!Threading required for this test.cCs�tj�}|j}t�}tj|j|j�}|jdd|d	�|jdd|d
�t	j
|jd�}|j�|j
d�|j|jtd�d�|j|j��x"dD]}|j|dd||f�}q�W|j
d�|j|jtd�d�|j|jtd�d�|j|j��|j
d�|j|jtd�d�|j|j��|j
d�|j|jtd�d�|j|j��|j
d�|jtd�|j|j��|j|j��|j|j�d�dS)Nr�)�target)�timeout���i�)r)r/)r2r3r4)�queue�Queue�putrr r!rrr"r�Threadr#�startrr$�get�TIMEOUT�
assertTrue�empty�join�assertFalse�is_alive)r�qr%�timerr!rrr&r	r	r
�test_enter_concurrent=s8





zTestCase.test_enter_concurrentcsbg��fdd�}tjtjtj�}xd	D]}|jd|||f�}q&W|j�|j�dddddg�dS)
Ncs
�j|�S)N)r)r)rr	r
r^sz(TestCase.test_priority.<locals>.<lambda>rr4r/r2r3g{�G�z�?)rr4r/r2r3)r r!rrr-r#r$)rr%r!Zpriorityr&r	)rr
�
test_priority\s
zTestCase.test_priorityc	s�g��fdd�}tjtjtj�}tj�}|j|dd|d	�}|j|dd|d
�}|j|dd|d�}|j|dd|d�}|j|dd|d
�}|j|�|j|�|j�|j�dddg�dS)Ncs
�j|�S)N)r)r)rr	r
rgsz&TestCase.test_cancel.<locals>.<lambda>�{�G�z�?r�{�G�z�?���Q��?�{�G�z�?皙�����?)rE)rF)rG)rH)rI)r r!rrr-�cancelr#r$)	rr%r!�now�event1�event2�event3�event4�event5r	)rr
�test_canceles

zTestCase.test_cancelcCs�tj�}|j}t�}tj|j|j�}|j�}|j|dd|d	�}|j|dd|d
�}|j|dd|d�}|j|dd|d�}	|j|dd|d
�}
t	j
|jd�}|j�|j
d�|j|jtd�d�|j|j��|j|�|j|	�|j
d�|j|j��|j
d�|j|jtd�d�|j|j��|j
d�|j|jtd�d�|j|j��|j
d�|jtd�|j|j��|j|j��|j|j�d�dS)Nrr4r2r3r/)r0)r1i�)r)r4)r2)r3)r/)r5r6r7rr r!rrr-rr8r#r9rr$r:r;r<r=rJr>r?r@)rrAr%rBr!rKrLrMrOrPrNrr	r	r
�test_cancel_concurrentts<






zTestCase.test_cancel_concurrentcsvg��fdd�}tjtjtj�}|j|j��xd	D]}|j|d||f�}q4W|j|j��|j�|j|j��dS)
Ncs
�j|�S)N)r)r)rr	r
r�sz%TestCase.test_empty.<locals>.<lambda>皙�����?�{�G�z�?���Q��?�{�G�z�?�{�G�z�?r)rSrTrUrVrW)	r r!rrr<r=r-r?r#)rr%r!rr&r	)rr
�
test_empty�s
zTestCase.test_emptyc	s�g��fdd�}tjtjtj�}tj�}|j|dd|�}|j|dd|�}|j|dd|�}|j|dd|�}|j|dd|�}|j|j|||||g�dS)	Ncs
�j|�S)N)r)r)rr	r
r�sz%TestCase.test_queue.<locals>.<lambda>g�������?rg{�G�z�?g{�G�z�?g{�G�z�?g���Q��?)r r!rrr-r$r5)	rr%r!rKZe5Ze1Ze2Ze4Ze3r	)rr
�
test_queue�szTestCase.test_queuecs�g��fdd�}tj�}tjtjtj�}|j|d|�|j|d|dd�|j|d|dd�|j|d|d
dd	id
�|j�|j�fifdifdifddd	ifg�dS)Ncs�j||f�dS)N)r)�a�b)�seqr	r
r%�sz&TestCase.test_args_kwargs.<locals>.funrr4)�argumentrZr[Zfoor/)r]�kwargs)rr4)rZr[)rr4)rr4)rZr[)rr4)rr r!rr-r#ZassertCountEqual)rr%rKr!r	)r\r
�test_args_kwargs�szTestCase.test_args_kwargscs\g��fdd�}tjtjtj�}xdD]}|j|d||f�q&W|jd	d
�|j�g�dS)Ncs
�j|�S)N)r)r)rr	r
r�sz0TestCase.test_run_non_blocking.<locals>.<lambda>r�	���rF)Zblocking)rr`rarbrc)r r!rrr"r#r$)rr%r!rr	)rr
�test_run_non_blocking�s
zTestCase.test_run_non_blockingN)rrrr'r.�unittestZ
skipUnlessrrCrDrQrRrXrYr_rdr	r	r	r
r)s			!r�__main__)r5r rrer�ImportErrorr;rrr�mainr	r	r	r
�<module>s
#

Youez - 2016 - github.com/yon3zu
LinuXploit