diff options
| author | Benjamin Peterson <benjamin@python.org> | 2012-08-28 21:55:35 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2012-08-28 21:55:35 (GMT) |
| commit | 23d49d3e7e386bb2b26d5b944fc123f0f21ce0a6 (patch) | |
| tree | 2505d06c40de0283e39a5628108f72bf0549b7ff /Lib | |
| parent | 25cf30faf92b8b77c69a0fd4b839ceefbbaccc4f (diff) | |
| download | cpython-23d49d3e7e386bb2b26d5b944fc123f0f21ce0a6.zip cpython-23d49d3e7e386bb2b26d5b944fc123f0f21ce0a6.tar.gz cpython-23d49d3e7e386bb2b26d5b944fc123f0f21ce0a6.tar.bz2 | |
use the stricter PyMapping_Check (closes #15801)
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/test/string_tests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index 5931f3d..a161512 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -1113,6 +1113,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 xrange(100): |
