mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Issue #12285: Add test capturing failure.
This commit is contained in:
parent
fa5e7cf997
commit
a0c6c1c659
1 changed files with 10 additions and 0 deletions
|
@ -6,7 +6,9 @@ from distutils import debug
|
||||||
from distutils.log import WARN
|
from distutils.log import WARN
|
||||||
from distutils.errors import DistutilsTemplateError
|
from distutils.errors import DistutilsTemplateError
|
||||||
from distutils.filelist import glob_to_re, translate_pattern, FileList
|
from distutils.filelist import glob_to_re, translate_pattern, FileList
|
||||||
|
from distutils import filelist
|
||||||
|
|
||||||
|
import test.support
|
||||||
from test.support import captured_stdout
|
from test.support import captured_stdout
|
||||||
from distutils.tests import support
|
from distutils.tests import support
|
||||||
|
|
||||||
|
@ -292,5 +294,13 @@ class FileListTestCase(support.LoggingSilencer,
|
||||||
self.assertWarnings()
|
self.assertWarnings()
|
||||||
|
|
||||||
|
|
||||||
|
class FindAllTestCase(unittest.TestCase):
|
||||||
|
@test.support.skip_unless_symlink
|
||||||
|
def test_missing_symlink(self):
|
||||||
|
with test.support.temp_cwd():
|
||||||
|
os.symlink('foo', 'bar')
|
||||||
|
self.assertEqual(filelist.findall(), [])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue