File tree Expand file tree Collapse file tree 3 files changed +789
-2
lines changed Expand file tree Collapse file tree 3 files changed +789
-2
lines changed Original file line number Diff line number Diff line change @@ -507,6 +507,11 @@ def test_mod(self):
507
507
a = b % (b'seventy-nine' , 79 )
508
508
self .assertEqual (a , b'seventy-nine / 100 = 79%' )
509
509
self .assertIs (type (a ), self .type2test )
510
+ # issue 29714
511
+ b = self .type2test (b'hello,\x00 %b!' )
512
+ b = b % b'world'
513
+ self .assertEqual (b , b'hello,\x00 world!' )
514
+ self .assertIs (type (b ), self .type2test )
510
515
511
516
def test_imod (self ):
512
517
b = self .type2test (b'hello, %b!' )
@@ -519,6 +524,11 @@ def test_imod(self):
519
524
b %= (b'seventy-nine' , 79 )
520
525
self .assertEqual (b , b'seventy-nine / 100 = 79%' )
521
526
self .assertIs (type (b ), self .type2test )
527
+ # issue 29714
528
+ b = self .type2test (b'hello,\x00 %b!' )
529
+ b %= b'world'
530
+ self .assertEqual (b , b'hello,\x00 world!' )
531
+ self .assertIs (type (b ), self .type2test )
522
532
523
533
def test_rmod (self ):
524
534
with self .assertRaises (TypeError ):
You can’t perform that action at this time.
0 commit comments