aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_sslproto.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-12-20 12:23:05 +0200
committerGitHub <noreply@github.com>2021-12-20 12:23:05 +0200
commit6ca78affc8023bc5023189d64d8050857662042a (patch)
treee6cae1875586d1c722005311492b4126707d9a2e /Lib/test/test_asyncio/test_sslproto.py
parent7c5c3f7254d78babcaf7a2ec187fd6ec53b8403c (diff)
downloadcpython-6ca78affc8023bc5023189d64d8050857662042a.tar.gz
cpython-6ca78affc8023bc5023189d64d8050857662042a.zip
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_sslproto.py')
-rw-r--r--Lib/test/test_asyncio/test_sslproto.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py
index a47e43dd4ca..22a216a83e3 100644
--- a/Lib/test/test_asyncio/test_sslproto.py
+++ b/Lib/test/test_asyncio/test_sslproto.py
@@ -383,9 +383,9 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
def get_buffer(self, sizehint):
return self.buf
- def buffer_updated(self, nsize):
- assert nsize == 1
- self.on_data.set_result(bytes(self.buf[:nsize]))
+ def buffer_updated(slf, nsize):
+ self.assertEqual(nsize, 1)
+ slf.on_data.set_result(bytes(slf.buf[:nsize]))
class ClientProtoSecond(asyncio.Protocol):
def __init__(self, on_data, on_eof):