summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_asyncio/test_locks.py4
-rw-r--r--Lib/test/test_asyncio/test_streams.py9
2 files changed, 7 insertions, 6 deletions
diff --git a/Lib/test/test_asyncio/test_locks.py b/Lib/test/test_asyncio/test_locks.py
index f365a45106..78d80ecf4f 100644
--- a/Lib/test/test_asyncio/test_locks.py
+++ b/Lib/test/test_asyncio/test_locks.py
@@ -10,7 +10,7 @@ from asyncio import test_utils
STR_RGX_REPR = (
r'^<(?P<class>.*?) object at (?P<address>.*?)'
r'\[(?P<extras>'
- r'(set|unset|locked|unlocked)(,value:\d)?(,waiters:\d+)?'
+ r'(set|unset|locked|unlocked)(, value:\d)?(, waiters:\d+)?'
r')\]>\Z'
)
RGX_REPR = re.compile(STR_RGX_REPR)
@@ -760,7 +760,7 @@ class SemaphoreTests(test_utils.TestCase):
def test_repr(self):
sem = asyncio.Semaphore(loop=self.loop)
- self.assertTrue(repr(sem).endswith('[unlocked,value:1]>'))
+ self.assertTrue(repr(sem).endswith('[unlocked, value:1]>'))
self.assertTrue(RGX_REPR.match(repr(sem)))
self.loop.run_until_complete(sem.acquire())
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index 2f4e6d23bf..1927d73128 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -806,7 +806,7 @@ os.close(fd)
def test___repr__nondefault_limit(self):
stream = asyncio.StreamReader(loop=self.loop, limit=123)
- self.assertEqual("<StreamReader l=123>", repr(stream))
+ self.assertEqual("<StreamReader limit=123>", repr(stream))
def test___repr__eof(self):
stream = asyncio.StreamReader(loop=self.loop)
@@ -822,14 +822,15 @@ os.close(fd)
stream = asyncio.StreamReader(loop=self.loop)
exc = RuntimeError()
stream.set_exception(exc)
- self.assertEqual("<StreamReader e=RuntimeError()>", repr(stream))
+ self.assertEqual("<StreamReader exception=RuntimeError()>",
+ repr(stream))
def test___repr__waiter(self):
stream = asyncio.StreamReader(loop=self.loop)
stream._waiter = asyncio.Future(loop=self.loop)
self.assertRegex(
repr(stream),
- r"<StreamReader w=<Future pending[\S ]*>>")
+ r"<StreamReader waiter=<Future pending[\S ]*>>")
stream._waiter.set_result(None)
self.loop.run_until_complete(stream._waiter)
stream._waiter = None
@@ -840,7 +841,7 @@ os.close(fd)
stream._transport = mock.Mock()
stream._transport.__repr__ = mock.Mock()
stream._transport.__repr__.return_value = "<Transport>"
- self.assertEqual("<StreamReader t=<Transport>>", repr(stream))
+ self.assertEqual("<StreamReader transport=<Transport>>", repr(stream))
def test_IncompleteReadError_pickleable(self):
e = asyncio.IncompleteReadError(b'abc', 10)