summaryrefslogtreecommitdiffstatshomepage
path: root/tests/misc
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-09-04 16:49:56 +0100
committerDamien George <damien.p.george@gmail.com>2015-09-04 16:49:56 +0100
commit55b11e6d38731ffb1a7378f936c940c61aef8743 (patch)
treea59475569251552b4087049f8fa87cfafd0c1edc /tests/misc
parent0b7a66ab9795948dfdffa65a4e542f86bc00f597 (diff)
downloadmicropython-55b11e6d38731ffb1a7378f936c940c61aef8743.tar.gz
micropython-55b11e6d38731ffb1a7378f936c940c61aef8743.zip
py/objstr: For str.endswith(s, start) raise NotImpl instead of assert.
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/non_compliant.py6
-rw-r--r--tests/misc/non_compliant.py.exp1
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/misc/non_compliant.py b/tests/misc/non_compliant.py
index 09abac2388..de84579067 100644
--- a/tests/misc/non_compliant.py
+++ b/tests/misc/non_compliant.py
@@ -52,6 +52,12 @@ try:
except NotImplementedError:
print('NotImplementedError')
+# str.endswith(s, start) not implemented
+try:
+ 'abc'.endswith('c', 1)
+except NotImplementedError:
+ print('NotImplementedError')
+
# bytes(...) with keywords not implemented
try:
bytes('abc', encoding='utf8')
diff --git a/tests/misc/non_compliant.py.exp b/tests/misc/non_compliant.py.exp
index 9278034aa4..28b1470d7c 100644
--- a/tests/misc/non_compliant.py.exp
+++ b/tests/misc/non_compliant.py.exp
@@ -8,3 +8,4 @@ NotImplementedError
NotImplementedError
NotImplementedError
NotImplementedError
+NotImplementedError