From 16737d33f911bfdbb6077960da531710b5d5515b Mon Sep 17 00:00:00 2001 From: jessekrubin Date: Fri, 19 Jan 2024 09:58:26 -0800 Subject: [PATCH] test any str! --- python/tests/test_anystr.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 python/tests/test_anystr.py diff --git a/python/tests/test_anystr.py b/python/tests/test_anystr.py new file mode 100644 index 0000000..79d1c93 --- /dev/null +++ b/python/tests/test_anystr.py @@ -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) \ No newline at end of file