예제 #1
0
 def test_filenames_as_singletons(self):
     # A singleton tuple of a filename is normalized to a 2-tuple of
     # the file name and made-up contents.
     entry = normalize_entry(('foo', ))
     self.assertEqual(('foo', "The file 'foo'."), entry)
예제 #2
0
 def test_directories_as_strings(self):
     # If directories are just given as strings, then they are normalized
     # to tuples of directory names and None.
     directory = normalize_entry('foo/')
     self.assertEqual(('foo/', None), directory)
예제 #3
0
 def test_filenames_as_strings(self):
     # If file names are just given as strings, then they are normalized to
     # tuples of filenames and made-up contents.
     entry = normalize_entry('foo')
     self.assertEqual(('foo', "The file 'foo'."), entry)
예제 #4
0
 def test_directories_as_tuples(self):
     # A tuple of directory name and None is already normalized.
     directory = normalize_entry(('foo/', None))
     self.assertEqual(('foo/', None), directory)
예제 #5
0
 def test_directories_as_singletons(self):
     # A singleton tuple of directory name is normalized to a 2-tuple of
     # the directory name and None.
     directory = normalize_entry(('foo/', ))
     self.assertEqual(('foo/', None), directory)
예제 #6
0
 def test_filenames_as_singletons(self):
     # A singleton tuple of a filename is normalized to a 2-tuple of
     # the file name and made-up contents.
     entry = normalize_entry(('foo',))
     self.assertEqual(('foo', "The file 'foo'."), entry)
예제 #7
0
 def test_file_as_tuple(self):
     # A tuple of filenames and contents is already normalized.
     entry = normalize_entry(('foo', 'foo contents'))
     self.assertEqual(('foo', 'foo contents'), entry)
예제 #8
0
 def test_filenames_as_strings(self):
     # If file names are just given as strings, then they are normalized to
     # tuples of filenames and made-up contents.
     entry = normalize_entry('foo')
     self.assertEqual(('foo', "The file 'foo'."), entry)
예제 #9
0
 def test_directories_as_strings(self):
     # If directories are just given as strings, then they are normalized
     # to tuples of directory names and None.
     directory = normalize_entry('foo/')
     self.assertEqual(('foo/', None), directory)
예제 #10
0
 def test_directories_as_singletons(self):
     # A singleton tuple of directory name is normalized to a 2-tuple of
     # the directory name and None.
     directory = normalize_entry(('foo/',))
     self.assertEqual(('foo/', None), directory)
예제 #11
0
 def test_directories_as_tuples(self):
     # A tuple of directory name and None is already normalized.
     directory = normalize_entry(('foo/', None))
     self.assertEqual(('foo/', None), directory)
예제 #12
0
 def test_file_as_tuple(self):
     # A tuple of filenames and contents is already normalized.
     entry = normalize_entry(('foo', 'foo contents'))
     self.assertEqual(('foo', 'foo contents'), entry)