File: //proc/self/root/lib/python3/dist-packages/twisted/test/__pycache__/test_error.cpython-38.pyc
U
W[�! � @ s~ d dl mZmZ d dlZd dlZd dlmZ d dlmZ d dl m
Z
G dd� dej�ZG dd � d ej�Z
G d
d� dej�ZdS )� )�division�absolute_importN)�unittest)�error)�platformTypec , @ s� e Zd ZdZdejfdejdgfdejddgfdejdd e�d
�ffdejfdejddgfd
ej fdej ddgfdej
fdej
dgfdej
g ddifdej
ddgfdejfdejdgfdejddgfdejfdej
fdejfdejfdejfdejfdejfdejfd ejfd!ejfd"ejddgfd#ejfd$ejddgfd%ejfd&ejfd'ejddgfd(ejfd)ejd*d+gfd,ejd-gfd.ejfd/ejg d0d1ifd2ejg d3d4ifd5ejfd6ejd*d7gfd8ejfd9ejd:d;gfg)Zd<d=� Zd>d?� Z d-S )@�StringificationTestsz;Test that the exceptions have useful stringifications.
z*An error occurred binding to an interface.z/An error occurred binding to an interface: foo.Zfooz3An error occurred binding to an interface: foo bar.Zbarz"Couldn't listen on eth0:4242: Foo.Zeth0i� ZFoozMessage is too long to send.z%Message is too long to send: foo bar.zDNS lookup failed.zDNS lookup failed: foo bar.z#An error occurred while connecting.z0An error occurred while connecting: someOsError.ZsomeOsErrorz(An error occurred while connecting: foo.�stringz5An error occurred while connecting: someOsError: foo.zCouldn't bind.zCouldn't bind: someOsError.z Couldn't bind: someOsError: foo.zHostname couldn't be looked up.zNo route to host.z%Connection was refused by other side.zTCP connection timed out.z%File used for UNIX socket is no good.z&Service name given as port is unknown.zUser aborted connection.z'User timeout caused connection failure.zAn SSL error occurred.z=Connection to the other side was lost in a non-clean fashion.zFConnection to the other side was lost in a non-clean fashion: foo bar.zConnection was closed cleanly.z'Connection was closed cleanly: foo bar.zUh.z(Tried to cancel an already-called event.z1Tried to cancel an already-called event: foo bar.z+Tried to cancel an already-cancelled event.z0Tried to cancel an already-cancelled event: x 2.�x�2zOA process has ended without apparent errors: process finished with exit code 0.NzCA process has ended with a probable error condition: process ended.zUA process has ended with a probable error condition: process ended with exit code 42.ZexitCode�* zTA process has ended with a probable error condition: process ended by signal SIGBUS.�signal�SIGBUSzFThe Connector was not connecting when it was asked to stop connecting.zLThe Connector was not connecting when it was asked to stop connecting: x 13.Z13z?The Port was not listening when it was asked to stop listening.zEThe Port was not listening when it was asked to stop listening: a 12.�aZ12c C s� | j D ]v}|d }|d }z|d }W n tk
r> d}Y nX z|d }W n tk
rd i }Y nX | �t|||��|� qd S )Nr � � � � )�listOfTests�
IndexError�assertEqual�str)�self�entry�outputZ exception�args�kwargsr r �9/usr/lib/python3/dist-packages/twisted/test/test_error.py�testThemAll� s
�z StringificationTests.testThemAllc C s"