Becky Mcquilling wrote:

        dir_list = os.listdir(self.dirname)
        dir_set = set()
        for file in dir_list:
            dir_set.add(file)
        self.assertEqual(dir_list, text_files, "The filelist is not equal")

You're comparing a list of file names to a set of file names. They will never match, even if they have the same content.

Try this instead:

dir_set = set(os.listdir(self.dirname))
self.assertEqual(dir_set, text_files, "The filelist is not equal")



--
Steven
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to