Mercurial > cpython-lru_cache-weakref
diff Lib/test/string_tests.py @ 78792:2801bf875a24 2.7
use the stricter PyMapping_Check (closes #15801)
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Tue, 28 Aug 2012 17:55:35 -0400 |
| parents | d3816fa1bcdf |
| children | d544873d62e9 |
line wrap: on
line diff
--- a/Lib/test/string_tests.py Tue Aug 28 19:23:56 2012 +0200 +++ b/Lib/test/string_tests.py Tue Aug 28 17:55:35 2012 -0400 @@ -1113,6 +1113,9 @@ 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):
