mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Add another test capturing the basic discovery expectation.
This commit is contained in:
parent
a0c6c1c659
commit
2c5278ad30
1 changed files with 11 additions and 0 deletions
|
@ -301,6 +301,17 @@ class FindAllTestCase(unittest.TestCase):
|
||||||
os.symlink('foo', 'bar')
|
os.symlink('foo', 'bar')
|
||||||
self.assertEqual(filelist.findall(), [])
|
self.assertEqual(filelist.findall(), [])
|
||||||
|
|
||||||
|
def test_basic_discovery(self):
|
||||||
|
with test.support.temp_cwd():
|
||||||
|
os.mkdir('foo')
|
||||||
|
file1 = os.path.join('foo', 'file1.txt')
|
||||||
|
test.support.create_empty_file(file1)
|
||||||
|
os.mkdir('bar')
|
||||||
|
file2 = os.path.join('bar', 'file2.txt')
|
||||||
|
test.support.create_empty_file(file2)
|
||||||
|
expected = [file1, file2]
|
||||||
|
self.assertEqual(filelist.findall(), expected)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue