← Back
Editing: test.cpython-311.pyc
� �|�e� � �b � d dl Z d dlmZ d dlmZ d dlmZ d dlmZm Z m Z G d� de� � ZdS )� N)�settings)�BaseCommand)�get_command_line_option)�NullTimeKeeper� TimeKeeper� get_runnerc �6 � � e Zd ZdZg ZdZ� fd�Zd� Zd� Z� xZ S )�CommandzIDiscover and run tests in the specified modules or the current directory.Nc �t �� t |d� � | _ t � � � |� � dS )z� Pre-parse the command line to extract the value of the --testrunner option. This allows a test runner to define additional command line arguments. �--testrunnerN)r �test_runner�super� run_from_argv)�self�argv� __class__s ��F/usr/lib/python3/dist-packages/django/core/management/commands/test.pyr zCommand.run_from_argv s5 �� � 3�4��H�H��� �����d�#�#�#�#�#� c �L � |� dddd�� � |� dddd d �� � |� dd d�� � |� dd�� � t t | j � � }t |d� � r|� |� � d S d S )N�args� test_label�*z_Module paths to test; can be modulename, modulename.TestCase or modulename.TestCase.test_method)�metavar�nargs�helpz --noinputz --no-input�store_false�interactivez:Tells Django to NOT prompt the user for input of any kind.)�action�destr z --failfast� store_truezDTells Django to stop running the test suite after first failed test.)r r r zhTells Django to use specified test runner class instead of the one specified by the TEST_RUNNER setting.)r � add_arguments)�add_argumentr r r �hasattrr! )r �parser�test_runner_classs r r! zCommand.add_arguments s� � �����L��r� � � � � �����m�-�M� � � � � �����W� � � � � ����A� � � � � '�x��1A�B�B���$�o�6�6� 4��+�+�F�3�3�3�3�3� 4� 4r c � � t t |d � � }|� dd� � rt � � n t � � } |di |��}|� d� � 5 |� |� � }d d d � � n# 1 swxY w Y |� � � |rt j d� � d S d S )N� testrunner�timingFz Total run� � ) r r �getr r �timed� run_tests� print_results�sys�exit)r �test_labels�options� TestRunner�time_keeperr �failuress r �handlezCommand.handle1 s � ���'�,�*?�@�@� �&-�k�k�(�E�&B�&B�X�j�l�l�l��HX�HX�� �j�+�+�7�+�+�� � � �{� +� +� :� :�"�,�,�[�9�9�H� :� :� :� :� :� :� :� :� :� :� :���� :� :� :� :��!�!�#�#�#�� ��H�Q�K�K�K�K�K� � s �+B � B�B) �__name__� __module__�__qualname__r �requires_system_checksr r r! r6 � __classcell__)r s @r r r sh �� � � � � �V�D� ���K�$� $� $� $� $�4� 4� 4�0 � � � � � � r r )r/ �django.confr �django.core.management.baser �django.core.management.utilsr �django.test.utilsr r r r r* r r �<module>r@ s� �� � � � � � � � � � � 3� 3� 3� 3� 3� 3� @� @� @� @� @� @� D� D� D� D� D� D� D� D� D� D�1� 1� 1� 1� 1�k� 1� 1� 1� 1� 1r
Save File
Cancel