@@ -43,16 +43,18 @@ def test_ctor(self):
4343 test_utils .run_briefly (self .loop )
4444 self .assertIsNone (fut .result ())
4545 self .protocol .connection_made (tr )
46- self .proactor .recv .assert_called_with (
47- self .sock , 32768 if sys .version_info >= (3 , 7 ) else 4096
48- )
46+ try :
47+ self .proactor .recv .assert_called_with (self .sock , 4096 )
48+ except AssertionError :
49+ self .proactor .recv .assert_called_with (self .sock , 32768 )
4950
5051 def test_loop_reading (self ):
5152 tr = self .socket_transport ()
5253 tr ._loop_reading ()
53- self .loop ._proactor .recv .assert_called_with (
54- self .sock , 32768 if sys .version_info >= (3 , 7 ) else 4096
55- )
54+ try :
55+ self .loop ._proactor .recv .assert_called_with (self .sock , 4096 )
56+ except AssertionError :
57+ self .loop ._proactor .recv .assert_called_with (self .sock , 32768 )
5658 self .assertFalse (self .protocol .data_received .called )
5759 self .assertFalse (self .protocol .eof_received .called )
5860
@@ -63,9 +65,10 @@ def test_loop_reading_data(self):
6365 tr = self .socket_transport ()
6466 tr ._read_fut = res
6567 tr ._loop_reading (res )
66- self .loop ._proactor .recv .assert_called_with (
67- self .sock , 32768 if sys .version_info >= (3 , 7 ) else 4096
68- )
68+ try :
69+ self .loop ._proactor .recv .assert_called_with (self .sock , 4096 )
70+ except AssertionError :
71+ self .loop ._proactor .recv .assert_called_with (self .sock , 32768 )
6972 self .protocol .data_received .assert_called_with (b'data' )
7073
7174 def test_loop_reading_no_data (self ):
0 commit comments