Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(35308)

Unified Diff: Lib/distutils/tests/test_register.py

Issue 19600: Use specific asserts in distutils tests
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
--- a/Lib/distutils/tests/test_register.py Thu Nov 14 23:50:51 2013 +0200
+++ b/Lib/distutils/tests/test_register.py Fri Nov 15 09:27:30 2013 +0200
@@ -98,7 +98,7 @@
cmd = self._get_cmd()
# we shouldn't have a .pypirc file yet
- self.assertTrue(not os.path.exists(self.rc))
+ self.assertFalse(os.path.exists(self.rc))
# patching input and getpass.getpass
# so register gets happy
@@ -145,7 +145,7 @@
self.assertEqual(req1['Content-length'], '1374')
self.assertEqual(req2['Content-length'], '1374')
- self.assertTrue((b'xxx') in self.conn.reqs[1].data)
+ self.assertIn(b'xxx', self.conn.reqs[1].data)
def test_password_not_in_file(self):
@@ -175,7 +175,7 @@
req = self.conn.reqs[0]
headers = dict(req.headers)
self.assertEqual(headers['Content-length'], '608')
- self.assertTrue((b'tarek') in req.data)
+ self.assertIn(b'tarek', req.data)
def test_password_reset(self):
# this test runs choice 3
@@ -193,7 +193,7 @@
req = self.conn.reqs[0]
headers = dict(req.headers)
self.assertEqual(headers['Content-length'], '290')
- self.assertTrue((b'tarek') in req.data)
+ self.assertIn(b'tarek', req.data)
@unittest.skipUnless(docutils is not None, 'needs docutils')
def test_strict(self):

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+