File: //lib/python3/dist-packages/twisted/internet/test/__pycache__/test_filedescriptor.cpython-310.pyc
o
�b�
� @ sh d Z ddlmZ ddlmZ ddlmZ ddlmZ G dd� de�Z G dd � d e�Z
G d
d� de�ZdS )
zA
Whitebox tests for L{twisted.internet.abstract.FileDescriptor}.
� )�verifyClass)�FileDescriptor)�
IPushProducer)�SynchronousTestCasec @ s4 e Zd ZdZdZdd� Zdd� Zdd� Zd d
� ZdS )�
MemoryFilea-
A L{FileDescriptor} customization which writes to a Python list in memory
with certain limitations.
@ivar _written: A C{list} of C{bytes} which have been accepted as written.
@ivar _freeSpace: A C{int} giving the number of bytes which will be accepted
by future writes.
Tc C s t j| t� d� g | _d| _d S )N��reactorr )r �__init__�object�_written�
_freeSpace��self� r �K/usr/lib/python3/dist-packages/twisted/internet/test/test_filedescriptor.pyr s
zMemoryFile.__init__c C � d S �Nr r
r r r �startWriting"