관리-도구
편집 파일: test_tempdir.cpython-311.pyc
� �܋fC � �~ � d dl Z d dlmZ d dlmZ d dlmZ d dlmZm Z m Z mZ d dlm Z ddlmZ G d � d e � � ZdS )� N)�ShouldAssert)�Mock)�mkdtemp)�Replacer� TempDirectory�compare�tempdir)�TestCase� )�rmtreec � � e Zd Z e� � d� � � Z e� � d� � � Z e� � d� � � Z ed�� � d� � � Zd� Z e� � d� � � Z e� � d � � � Z d � ZdS )�TestTempDirc � � |� dd� � |� dd� � |� d� � d S )N� something� stuff�.svn�r r ��writer ��self�ds �p/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/testfixtures/tests/test_tempdir.py�test_simplezTestTempDir.test_simple sO � � ����X�&�&�&� �����!�!�!� � � � � � � � � � c � � ddg}|� |dgz d� � |� |dgz d� � |� |d�� � d S )N�some�thingr r r r )�path�expectedr )r r �subdirs r �test_subdirszTestTempDir.test_subdirs sj � ��'�"�� �����}�$�h�/�/�/� �����x���*�*�*� � � �v� )� � � � � � r c � � |� dd� � t d� � 5 |� ddg� � d d d � � d S # 1 swxY w Y d S )Nr r z\sequence not as expected: same: () expected: ('.svn', 'something') actual: ('something',)r )r r r r s r � test_not_samezTestTempDir.test_not_same! s� � � ����X�&�&�&� � � � � -� -� �I�I�v�{�+�,�,�,� -� -� -� -� -� -� -� -� -� -� -� -���� -� -� -� -� -� -s �A�A�A)r )�ignorec � � |� dd� � |� dd� � |� dg� � d S )Nr r r r r s r �test_ignorezTestTempDir.test_ignore3 sD � � ����X�&�&�&� �����!�!�!� � � �;�-� � � � � r c � � t � � } t � � }t � � }||_ |� d|� � | � t j � |� � � � | � |j � � t � � d� � � }| � |j � � t t j |� � g � � |� � | � |j � � | � t j � |� � � � |� � � t j � |� � rt |� � d S d S # |� � � t j � |� � rt |� � w w xY w)N�"testfixtures.tempdirectory.mkdtempc �^ � | � dd� � | � dg� � d S )Nr r r �r s r �test_methodz6TestTempDir.test_cleanup_properly.<locals>.test_methodE s0 � �����X�.�.�.�� � �;�-�(�(�(�(�(r )r r r �return_value�replace� assertTrue�osr �exists�assertFalse�calledr r �listdir�restorer )r �r�mr r, s r �test_cleanup_properlyz!TestTempDir.test_cleanup_properly9 s{ � ��J�J�� ����A�� � �A��A�N� �I�I�:�A�>�>�>��O�O�B�G�N�N�1�-�-�.�.�.����Q�X�&�&�&� �Y�Y� )� )� �Y� )� ���Q�X�&�&�&��B�J�q�M�M�2�&�&�&��K�M�M�M��O�O�A�H�%�%�%����R�W�^�^�A�.�.�/�/�/� �I�I�K�K�K��w�~�~�a� � � ��q� � � � � � � �� �I�I�K�K�K��w�~�~�a� � � ��q� � � � � ���s �D.F �AG c �. � t |j � � d S �N)r r r s r �'test_cleanup_test_okay_with_deleted_dirz3TestTempDir.test_cleanup_test_okay_with_deleted_dirX s � ��q�v�����r c �V � | � t |t � � � � d S r: )r/ � isinstancer r s r �$test_decorator_returns_tempdirectoryz0TestTempDir.test_decorator_returns_tempdirectory\ s&