Skip to content

Commit

Permalink
Fix style issues in the tests
Browse files Browse the repository at this point in the history
twm committed Feb 16, 2018
1 parent a661fb2 commit a0ceb02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/twisted/internet/test/test_endpoints.py
Original file line number Diff line number Diff line change
@@ -2476,7 +2476,11 @@ def test_deferBadEncodingToConnect(self):
self.assertIn("\\u2ff0-garbage-\\u2ff0", str(err))



class HostnameEndpointReprTests(unittest.SynchronousTestCase):
"""
Tests for L{HostnameEndpoint}'s string representation.
"""
def test_allASCII(self):
"""
The string representation of L{HostnameEndpoint} includes the host and
@@ -2489,6 +2493,7 @@ def test_allASCII(self):

self.assertEqual("<HostnameEndpoint example.com:80>", repr(endpoint))


def test_idnaHostname(self):
"""
When IDN is passed to the L{HostnameEndpoint} constructor the string
@@ -2501,6 +2506,7 @@ def test_idnaHostname(self):

self.assertEqual("<HostnameEndpoint xn--bcher-kva.ch:443>", repr(endpoint))


def test_hostIPv6Address(self):
"""
When the host passed to L{HostnameEndpoint} is an IPv6 address it is
@@ -2515,6 +2521,7 @@ def test_hostIPv6Address(self):

self.assertEqual("<HostnameEndpoint [::1]:22>", repr(endpoint))


def test_badEncoding(self):
"""
When a bad hostname is passed to L{HostnameEndpoint}, the string

0 comments on commit a0ceb02

Please sign in to comment.