[Python-checkins] cpython (2.7): Fix improper tests in RegisterTestCase

eric.araujo python-checkins at python.org
Mon May 2 13:39:06 CEST 2011


http://hg.python.org/cpython/rev/8d538e088d95
changeset: 69765:8d538e088d95
branch: 2.7
parent: 69373:9e49f4d81f54
user: Éric Araujo <merwok at netwok.org>
date: Thu Apr 14 03:49:19 2011 +0200
summary:
 Fix improper tests in RegisterTestCase
files:
 Lib/distutils/tests/test_register.py | 6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Lib/distutils/tests/test_register.py b/Lib/distutils/tests/test_register.py
--- a/Lib/distutils/tests/test_register.py
+++ b/Lib/distutils/tests/test_register.py
@@ -138,7 +138,7 @@
 
 # let's see what the server received : we should
 # have 2 similar requests
- self.assertTrue(self.conn.reqs, 2)
+ self.assertEqual(len(self.conn.reqs), 2)
 req1 = dict(self.conn.reqs[0].headers)
 req2 = dict(self.conn.reqs[1].headers)
 self.assertEqual(req2['Content-length'], req1['Content-length'])
@@ -168,7 +168,7 @@
 del register_module.raw_input
 
 # we should have send a request
- self.assertTrue(self.conn.reqs, 1)
+ self.assertEqual(len(self.conn.reqs), 1)
 req = self.conn.reqs[0]
 headers = dict(req.headers)
 self.assertEqual(headers['Content-length'], '608')
@@ -186,7 +186,7 @@
 del register_module.raw_input
 
 # we should have send a request
- self.assertTrue(self.conn.reqs, 1)
+ self.assertEqual(len(self.conn.reqs), 1)
 req = self.conn.reqs[0]
 headers = dict(req.headers)
 self.assertEqual(headers['Content-length'], '290')
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /