Skip to content

Commit

Permalink
test any str!
Browse files Browse the repository at this point in the history
  • Loading branch information
jessekrubin committed Jan 19, 2024
1 parent adf9e51 commit 16737d3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions python/tests/test_anystr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import ry

def test_anystr_string():
s = 'abc'
assert ry.anystr_noop(s) == s
assert isinstance(ry.anystr_noop(s), str)

def test_anystr_bytes():
b = b'abc'
assert ry.anystr_noop(b) == b
assert isinstance(ry.anystr_noop(b), bytes)

0 comments on commit 16737d3

Please sign in to comment.