Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9cad4fa

Browse files
committed
Replace UnicodeDecodeError with ValueError
UnicodeDecodeError needs 5 arguments, but we only pass 1. It's a bit complicated to reraise an UnicodeDecodeError, so we just reraise a ValueError instead.
1 parent e27a9e2 commit 9cad4fa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_embed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def test_ipython_embed():
6262
try:
6363
std = out.decode("UTF-8")
6464
except UnicodeDecodeError as e:
65-
raise UnicodeDecodeError(f"Error decoding {out!r}") from e
65+
raise ValueError(f"Error decoding {out!r}") from e
6666

6767
assert p.returncode == 0, (p.returncode, std)
6868
assert "3 . 14" in std

0 commit comments

Comments
 (0)