summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2012-06-20 14:24:24 (GMT)
committerJason R. Coombs <jaraco@jaraco.com>2012-06-20 14:24:24 (GMT)
commit42c9b04278205ce0a7d3a91a552d60d7d1eb6d86 (patch)
treede34c7d8e1f974bb018ce1498ab61bea7fbe139b /Lib/test/test_import.py
parentd8623e8e66f01605462a67f0a143691c3eb6ba72 (diff)
downloadcpython-42c9b04278205ce0a7d3a91a552d60d7d1eb6d86.zip
cpython-42c9b04278205ce0a7d3a91a552d60d7d1eb6d86.tar.gz
cpython-42c9b04278205ce0a7d3a91a552d60d7d1eb6d86.tar.bz2
Prefer assertEqual to simply assert per recommendation in issue6727.
Clarified comment on disabled code to reference issue15093.
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r--Lib/test/test_import.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index 7ae690b..c94d7bd 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -707,14 +707,19 @@ class TestSymbolicallyLinkedPackage(unittest.TestCase):
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):