mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #6095: Make directory argument to os.listdir optional.
Patch by Virgil Dupras.
This commit is contained in:
parent
e186e384f4
commit
c9e1c7d97f
4 changed files with 35 additions and 14 deletions
|
@ -252,9 +252,14 @@ class PosixTester(unittest.TestCase):
|
|||
posix.chdir(os.curdir)
|
||||
self.assertRaises(OSError, posix.chdir, support.TESTFN)
|
||||
|
||||
def test_lsdir(self):
|
||||
if hasattr(posix, 'lsdir'):
|
||||
self.assertIn(support.TESTFN, posix.lsdir(os.curdir))
|
||||
def test_listdir(self):
|
||||
if hasattr(posix, 'listdir'):
|
||||
self.assertTrue(support.TESTFN in posix.listdir(os.curdir))
|
||||
|
||||
def test_listdir_default(self):
|
||||
# When listdir is called without argument, it's the same as listdir(os.curdir)
|
||||
if hasattr(posix, 'listdir'):
|
||||
self.assertTrue(support.TESTFN in posix.listdir())
|
||||
|
||||
def test_access(self):
|
||||
if hasattr(posix, 'access'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue