Skip to content

Commit 350db60

Browse files
committed
deatil asserts
1 parent 2baf425 commit 350db60

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

mypyc/test-data/run-bytes.test

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -412,30 +412,30 @@ def ljust_bytes(b: bytes, width: int, fill: bytes = b' ') -> bytes:
412412
return b.ljust(width, fill)
413413

414414
def test_rjust_with_default_fill() -> None:
415-
assert rjust_bytes(b'abc', 6) == b' abc'
416-
assert rjust_bytes(b'abc', 3) == b'abc'
417-
assert rjust_bytes(b'abc', 2) == b'abc'
418-
assert rjust_bytes(b'', 4) == b' '
415+
assert rjust_bytes(b'abc', 6) == b' abc', rjust_bytes(b'abc', 6)
416+
assert rjust_bytes(b'abc', 3) == b'abc', rjust_bytes(b'abc', 3)
417+
assert rjust_bytes(b'abc', 2) == b'abc', rjust_bytes(b'abc', 2)
418+
assert rjust_bytes(b'', 4) == b' ', rjust_bytes(b'', 4)
419419

420420
def test_rjust_with_custom_fill() -> None:
421-
assert rjust_bytes(b'abc', 6, b'0') == b'000abc'
422-
assert rjust_bytes(b'abc', 5, b'_') == b'__abc'
423-
assert rjust_bytes(b'abc', 3, b'X') == b'abc'
421+
assert rjust_bytes(b'abc', 6, b'0') == b'000abc', rjust_bytes(b'abc', 6, b'0')
422+
assert rjust_bytes(b'abc', 5, b'_') == b'__abc', rjust_bytes(b'abc', 5, b'_')
423+
assert rjust_bytes(b'abc', 3, b'X') == b'abc', rjust_bytes(b'abc', 3, b'X')
424424

425425
def test_ljust_with_default_fill() -> None:
426-
assert ljust_bytes(b'abc', 6) == b'abc '
427-
assert ljust_bytes(b'abc', 3) == b'abc'
428-
assert ljust_bytes(b'abc', 2) == b'abc'
429-
assert ljust_bytes(b'', 4) == b' '
426+
assert ljust_bytes(b'abc', 6) == b'abc ', ljust_bytes(b'abc', 6)
427+
assert ljust_bytes(b'abc', 3) == b'abc', ljust_bytes(b'abc', 3)
428+
assert ljust_bytes(b'abc', 2) == b'abc', ljust_bytes(b'abc', 2)
429+
assert ljust_bytes(b'', 4) == b' ', ljust_bytes(b'', 4)
430430

431431
def test_ljust_with_custom_fill() -> None:
432-
assert ljust_bytes(b'abc', 6, b'0') == b'abc000'
433-
assert ljust_bytes(b'abc', 5, b'_') == b'abc__'
434-
assert ljust_bytes(b'abc', 3, b'X') == b'abc'
432+
assert ljust_bytes(b'abc', 6, b'0') == b'abc000', ljust_bytes(b'abc', 6, b'0')
433+
assert ljust_bytes(b'abc', 5, b'_') == b'abc__', ljust_bytes(b'abc', 5, b'_')
434+
assert ljust_bytes(b'abc', 3, b'X') == b'abc', ljust_bytes(b'abc', 3, b'X')
435435

436436
def test_edge_cases() -> None:
437-
assert rjust_bytes(b'abc', 0) == b'abc'
438-
assert ljust_bytes(b'abc', 0) == b'abc'
437+
assert rjust_bytes(b'abc', 0) == b'abc', rjust_bytes(b'abc', 0)
438+
assert ljust_bytes(b'abc', 0) == b'abc', ljust_bytes(b'abc', 0)
439439
# fillbyte must be length 1
440440
with assertRaises(TypeError):
441441
rjust_bytes(b'abc', 5, b'')

0 commit comments

Comments
 (0)