summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/string_strip.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-30 03:11:44 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-30 03:15:17 +0300
commit8827682b35f6fefb4604f28447b77e8443cbf1cb (patch)
tree6dc258faa2d577dc893f231fc19ff53ac6b2127e /tests/basics/string_strip.py
parentbcdffe53c641ad5832f06cd544f29e3cdd522829 (diff)
downloadmicropython-8827682b35f6fefb4604f28447b77e8443cbf1cb.tar.gz
micropython-8827682b35f6fefb4604f28447b77e8443cbf1cb.zip
objstr: *strip(): If nothing is stripped, don't create dup string.
Diffstat (limited to 'tests/basics/string_strip.py')
-rw-r--r--tests/basics/string_strip.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/basics/string_strip.py b/tests/basics/string_strip.py
index 70c74b3834..5d99a78e51 100644
--- a/tests/basics/string_strip.py
+++ b/tests/basics/string_strip.py
@@ -31,3 +31,7 @@ print(" a".rstrip())
print("a ".strip())
print("a ".lstrip())
print("a ".rstrip())
+
+# Test that stripping unstrippable string returns original object
+s = "abc"
+print(id(s.strip()) == id(s))