mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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.
This commit is contained in:
parent
7c5c3f7254
commit
6ca78affc8
10 changed files with 102 additions and 63 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue