summaryrefslogtreecommitdiff
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-08-28 17:55:35 -0400
committerBenjamin Peterson <benjamin@python.org>2012-08-28 17:55:35 -0400
commit28a6cfaefc41a4e4bfa6dd0b54318c0465987652 (patch)
treeb3334773d534a57edf85e637c30e2c07ce53f3b6 /Lib/test/string_tests.py
parent2412c93a6068221686397c26b129215eac024e9c (diff)
downloadcpython-git-28a6cfaefc41a4e4bfa6dd0b54318c0465987652.tar.gz
use the stricter PyMapping_Check (closes #15801)
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index d792529020..413f9dd8fe 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -1142,6 +1142,9 @@ class MixinStrUnicodeUserStringTest:
self.checkraises(TypeError, '%10.*f', '__mod__', ('foo', 42.))
self.checkraises(ValueError, '%10', '__mod__', (42,))
+ class X(object): pass
+ self.checkraises(TypeError, 'abc', '__mod__', X())
+
def test_floatformatting(self):
# float formatting
for prec in range(100):