Shorten lines.

This commit is contained in:
Guido van Rossum 2013-12-19 12:47:38 -08:00
parent 3b8df2683d
commit 994bf4332f
2 changed files with 4 additions and 3 deletions

View file

@ -138,7 +138,7 @@ def __iter__(self):
class Event:
"""An Event implementation, asynchronous equivalent to threading.Event.
"""Asynchronous equivalent to threading.Event.
Class implementing event objects. An event manages a flag that can be set
to true with the set() method and reset to false with the clear() method.
@ -204,7 +204,7 @@ def wait(self):
class Condition:
"""A Condition implementation, asynchronous equivalent to threading.Condition.
"""Asynchronous equivalent to threading.Condition.
This class implements condition variable objects. A condition variable
allows one or more coroutines to wait until they are notified by another

View file

@ -720,7 +720,8 @@ def factory():
# incorrect server_hostname
f_c = self.loop.create_connection(MyProto, host, port,
ssl=sslcontext_client)
with self.assertRaisesRegex(ssl.CertificateError,
with self.assertRaisesRegex(
ssl.CertificateError,
"hostname '127.0.0.1' doesn't match 'localhost'"):
self.loop.run_until_complete(f_c)