Back to index

python3.2  3.2.2
Public Member Functions
distutils.tests.test_filelist.FileListTestCase Class Reference

List of all members.

Public Member Functions

def test_glob_to_re
def test_debug_print

Detailed Description

Definition at line 8 of file test_filelist.py.


Member Function Documentation

Definition at line 22 of file test_filelist.py.

00022 
00023     def test_debug_print(self):
00024         file_list = FileList()
00025         with captured_stdout() as stdout:
00026             file_list.debug_print('xxx')
00027         stdout.seek(0)
00028         self.assertEqual(stdout.read(), '')
00029 
00030         debug.DEBUG = True
00031         try:
00032             with captured_stdout() as stdout:
00033                 file_list.debug_print('xxx')
00034             stdout.seek(0)
00035             self.assertEqual(stdout.read(), 'xxx\n')
00036         finally:
00037             debug.DEBUG = False

Here is the call graph for this function:

Definition at line 10 of file test_filelist.py.

00010 
00011     def test_glob_to_re(self):
00012         # simple cases
00013         self.assertEqual(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)')
00014         self.assertEqual(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)')
00015         self.assertEqual(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)')
00016 
00017         # special cases
00018         self.assertEqual(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)')
00019         self.assertEqual(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)')
00020         self.assertEqual(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)')
00021         self.assertEqual(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)')

Here is the call graph for this function:


The documentation for this class was generated from the following file: