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)
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)
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)
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)
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)
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)
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)
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)