summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_streams.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-12-20 10:23:05 (GMT)
committerGitHub <noreply@github.com>2021-12-20 10:23:05 (GMT)
commit6ca78affc8023bc5023189d64d8050857662042a (patch)
treee6cae1875586d1c722005311492b4126707d9a2e /Lib/test/test_asyncio/test_streams.py
parent7c5c3f7254d78babcaf7a2ec187fd6ec53b8403c (diff)
downloadcpython-6ca78affc8023bc5023189d64d8050857662042a.zip
cpython-6ca78affc8023bc5023189d64d8050857662042a.tar.gz
cpython-6ca78affc8023bc5023189d64d8050857662042a.tar.bz2
bpo-23819: Get rid of assert statements in test_asyncio (GH-30212)
To keep checks even if run tests with optimized Python. Either use special assertion methods like assertEqual() or raise an AssertionError explicitly.
Diffstat (limited to 'Lib/test/test_asyncio/test_streams.py')
-rw-r--r--Lib/test/test_asyncio/test_streams.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index a6ea24c..227b227 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -987,10 +987,10 @@ os.close(fd)
wr.close()
f = wr.wait_closed()
self.loop.run_until_complete(f)
- assert rd.at_eof()
+ self.assertTrue(rd.at_eof())
f = rd.read()
data = self.loop.run_until_complete(f)
- assert data == b''
+ self.assertEqual(data, b'')
self.assertEqual(messages, [])