mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
Prefer assertEqual to simply assert per recommendation in issue6727.
Clarified comment on disabled code to reference issue15093.
This commit is contained in:
parent
d8623e8e66
commit
42c9b04278
1 changed files with 8 additions and 3 deletions
|
|
@ -707,14 +707,19 @@ class TestSymbolicallyLinkedPackage(unittest.TestCase):
|
||||||
os.mkdir(self.tagged)
|
os.mkdir(self.tagged)
|
||||||
init_file = os.path.join(self.tagged, '__init__.py')
|
init_file = os.path.join(self.tagged, '__init__.py')
|
||||||
open(init_file, 'w').close()
|
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
|
# now create a symlink to the tagged package
|
||||||
# sample -> sample-tagged
|
# sample -> sample-tagged
|
||||||
os.symlink(self.tagged, self.package_name)
|
os.symlink(self.tagged, self.package_name)
|
||||||
|
|
||||||
# assert os.path.isdir(self.package_name) # currently fails
|
# disabled because os.isdir currently fails (see issue 15093)
|
||||||
assert os.path.isfile(os.path.join(self.package_name, '__init__.py'))
|
# self.assertEqual(os.path.isdir(self.package_name), True)
|
||||||
|
|
||||||
|
self.assertEqual(
|
||||||
|
os.path.isfile(os.path.join(self.package_name, '__init__.py')),
|
||||||
|
True,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def tagged(self):
|
def tagged(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue