Current File : //proc/self/root/lib/python3/dist-packages/twisted/trial/test/__pycache__/test_util.cpython-312.pyc |
�
Ϫ�f�V � � � d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z ddl
mZ ddlm
Z
mZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZmZmZmZm Z G d� de� Z! G d� de� Z" G d� d� Z# G d� d� Z$ G d� de� Z% G d� de� Z& G d� de� Z' G d� de� Z( G d� d e� Z) G d!� d"e� Z*y)#z!
Tests for L{twisted.trial.util}
� )�annotationsN)�StringIO)� Generator)�implementer)�assert_that�equal_to)�DelayedCall)�IProcessTransport)�filepath)�Failure)�util)�SynchronousTestCase)�DirtyReactorAggregateError�_Janitor�acquireAttribute�excInfoOrFailureToExcInfo�openTestLogc �0 � e Zd ZdZdd�Zdd�Zdd�Zdd�Zy)�MktempTestszm
Tests for L{TestCase.mktemp}, a helper function for creating temporary file
or directory names.
c �� � | j � }t j j |� j t j
� dd }| j
|g d�� y)z�
The path name returned by C{mktemp} is directly beneath a directory
which identifies the test method which created the name.
N���)ztwisted.trial.test.test_utilr � test_name)�mktemp�os�path�dirname�split�sep�assertEqual)�self�name�dirss �>/usr/lib/python3/dist-packages/twisted/trial/test/test_util.pyr zMktempTests.test_name) sK � �
�{�{�}���w�w���t�$�*�*�2�6�6�2�3�B�7������N�
� c �d � | j � }| j || j � � y)zF
Repeated calls to C{mktemp} return different values.
N)r �assertNotEqual)r r! s r# �test_uniquezMktempTests.test_unique4 s% � � �{�{�}�����D�$�+�+�-�0r$ c � � | j � }t j j |� }| j t j j |� � | j
t j j |� � y)zS
The directory part of the path name returned by C{mktemp} exists.
N)r r r r �
assertTrue�exists�assertFalse)r r! r s r# �test_createdzMktempTests.test_created; sU � � �{�{�}���'�'�/�/�$�'����������w�/�0����������-�.r$ c �� � t j j | j � � }| j |j t j � � � y)zZ
The path returned by C{mktemp} is beneath the current working directory.
N)r r �abspathr r) �
startswith�getcwd)r r s r# �
test_locationzMktempTests.test_locationD s7 � � �w�w���t�{�{�}�-��������� � ��4�5r$ N��return�None)�__name__�
__module__�__qualname__�__doc__r r'