Skip to content

Commit

Permalink
Fix type check error in test
Browse files Browse the repository at this point in the history
  • Loading branch information
oremanj committed May 6, 2019
1 parent 84d48fe commit fa7a1ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tricycle/_tests/test_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ async def test_text_receive(autojump_clock: trio.testing.MockClock) -> None:
b"That \xf0\x9f\xa6\x8a is still jumping.\r" # fox emoji
)

assert TextReceiveStream(None).encoding == locale.getpreferredencoding(False)
# Test that encoding=None uses the locale preferred encoding
stream = TextReceiveStream(None) # type: ignore
assert stream.encoding == locale.getpreferredencoding(False)
del stream

newline: Optional[str]
for newline in ("\r", "\n", "\r\n", "", "jump", None):
Expand Down

0 comments on commit fa7a1ab

Please sign in to comment.