%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/internet/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/internet/test/__pycache__/test_inotify.cpython-312.pyc |
� Ϫ�f�H � � � d Z ddlZddlmZmZ ddlmZmZ ddlm Z ddl mZ e d� �ddlmZ ndZ G d � d ej � Zy)z? Tests for the inotify wrapper in L{twisted.internet.inotify}. � N)�defer�reactor)�filepath�runtime)� requireModule)�unittestztwisted.python._inotify)�inotifyc �� � e Zd ZdZej j � sdZd� Zd� Z d d�Z d� Zd� Zd � Z d � Zd� Zd� Zd � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z!d� Z"d� Z#y)!�INotifyTestsz] Define all the tests for the basic functionality exposed by L{inotify.INotify}. z&This platform doesn't support INotify.c �8 � t j | j � � | _ | j j � t j � | _ | j j � | j | j j � y �N) r �FilePath�mktemp�dirname�createDirectoryr �INotify�startReading� addCleanup�loseConnection��selfs �D/usr/lib/python3/dist-packages/twisted/internet/test/test_inotify.py�setUpzINotifyTests.setUp s^ � ��(�(�����7������$�$�&����(������!�!�#�������3�3�4� c � � G d� d� }| j t j d |� � | j t j t j � y)a L{inotify.INotify} emits a C{RuntimeError} when initialized in an environment that doesn't support inotify as we expect it. We just try to raise an exception for every possible case in the for loop in L{inotify.INotify._inotify__init__}. c � � e Zd Zd� Zy)�;INotifyTests.test_initializationErrors.<locals>.FakeINotifyc �* � t j � �r )r �INotifyErrorr s r �initz@INotifyTests.test_initializationErrors.<locals>.FakeINotify.init. s � ��*�*�,�,r N)�__name__� __module__�__qualname__r � r r �FakeINotifyr - s � � -r r% �_inotifyN)�patchr r �assertRaisesr )r r% s r �test_initializationErrorsz&INotifyTests.test_initializationErrors$ s>