[pypy-commit] pypy merge-2.7.2: tets_socket: Loosen comparison of error messages.
amauryfa
noreply at buildbot.pypy.org
Sun Jan 29 19:20:52 CET 2012
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: merge-2.7.2
Changeset: r51950:674ef5a78812
Date: 2012-01-29 14:27 +0100
http://bitbucket.org/pypy/pypy/changeset/674ef5a78812/
Log: tets_socket: Loosen comparison of error messages.
diff --git a/lib-python/modified-2.7/test/test_socket.py b/lib-python/modified-2.7/test/test_socket.py
--- a/lib-python/modified-2.7/test/test_socket.py
+++ b/lib-python/modified-2.7/test/test_socket.py
@@ -286,32 +286,34 @@
s.sendto(u'\u2620', sockname)
with self.assertRaises(TypeError) as cm:
s.sendto(5j, sockname)
- self.assertIn('not complex', str(cm.exception))
+ self.assertIn('complex', str(cm.exception))
with self.assertRaises(TypeError) as cm:
s.sendto('foo', None)
- self.assertIn('not NoneType', str(cm.exception))
+ self.assertIn('NoneType', str(cm.exception))
# 3 args
with self.assertRaises(UnicodeEncodeError):
s.sendto(u'\u2620', 0, sockname)
with self.assertRaises(TypeError) as cm:
s.sendto(5j, 0, sockname)
- self.assertIn('not complex', str(cm.exception))
+ self.assertIn('complex', str(cm.exception))
with self.assertRaises(TypeError) as cm:
s.sendto('foo', 0, None)
- self.assertIn('not NoneType', str(cm.exception))
+ if test_support.check_impl_detail():
+ self.assertIn('not NoneType', str(cm.exception))
with self.assertRaises(TypeError) as cm:
s.sendto('foo', 'bar', sockname)
- self.assertIn('an integer is required', str(cm.exception))
+ self.assertIn('integer', str(cm.exception))
with self.assertRaises(TypeError) as cm:
s.sendto('foo', None, None)
- self.assertIn('an integer is required', str(cm.exception))
+ if test_support.check_impl_detail():
+ self.assertIn('an integer is required', str(cm.exception))
# wrong number of args
with self.assertRaises(TypeError) as cm:
s.sendto('foo')
- self.assertIn('(1 given)', str(cm.exception))
+ self.assertIn(' given)', str(cm.exception))
with self.assertRaises(TypeError) as cm:
s.sendto('foo', 0, sockname, 4)
- self.assertIn('(4 given)', str(cm.exception))
+ self.assertIn(' given)', str(cm.exception))
def testCrucialConstants(self):
More information about the pypy-commit
mailing list