summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-11 13:17:29 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-11 13:17:29 +0300
commitb2d4fc06fc95d8e96eabd6ef470f0e871275fb82 (patch)
treecc2f9cf3279adb051a6daa6d554038ff494256e9 /tests/basics
parentce6c10172be6d17f76779ece930908f6248a1706 (diff)
downloadmicropython-b2d4fc06fc95d8e96eabd6ef470f0e871275fb82.tar.gz
micropython-b2d4fc06fc95d8e96eabd6ef470f0e871275fb82.zip
objstr: Make *strip() accept bytes.
Diffstat (limited to 'tests/basics')
-rw-r--r--tests/basics/string_strip.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/basics/string_strip.py b/tests/basics/string_strip.py
index 8e03eff93a..4684c2a248 100644
--- a/tests/basics/string_strip.py
+++ b/tests/basics/string_strip.py
@@ -10,3 +10,13 @@ print('www.example.com'.lstrip('cmowz.'))
print(' spacious '.rstrip())
print('mississippi'.rstrip('ipz'))
+
+print(b'mississippi'.rstrip(b'ipz'))
+try:
+ print(b'mississippi'.rstrip('ipz'))
+except TypeError:
+ print("TypeError")
+try:
+ print('mississippi'.rstrip(b'ipz'))
+except TypeError:
+ print("TypeError")