[Python-checkins] cpython: Prefer assertEqual to simply assert per recommendation in issue6727.
jason.coombs
python-checkins at python.org
Wed Jun 20 16:25:17 CEST 2012
http://hg.python.org/cpython/rev/24369f6c4a22
changeset: 77525:24369f6c4a22
user: Jason R. Coombs <jaraco at jaraco.com>
date: Wed Jun 20 10:24:24 2012 -0400
summary:
Prefer assertEqual to simply assert per recommendation in issue6727.
Clarified comment on disabled code to reference issue15093.
files:
Lib/test/test_import.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -707,14 +707,19 @@
os.mkdir(self.tagged)
init_file = os.path.join(self.tagged, '__init__.py')
open(init_file, 'w').close()
- assert os.path.exists(init_file)
+ self.assertEqual(os.path.exists(init_file), True)
# now create a symlink to the tagged package
# sample -> sample-tagged
os.symlink(self.tagged, self.package_name)
- # assert os.path.isdir(self.package_name) # currently fails
- assert os.path.isfile(os.path.join(self.package_name, '__init__.py'))
+ # disabled because os.isdir currently fails (see issue 15093)
+ # self.assertEqual(os.path.isdir(self.package_name), True)
+
+ self.assertEqual(
+ os.path.isfile(os.path.join(self.package_name, '__init__.py')),
+ True,
+ )
@property
def tagged(self):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list