Re: [Tutor] Writing to the file system and verify the files written out.

2011-04-15 Thread Steven D'Aprano
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

[Tutor] Writing to the file system and verify the files written out.

2011-04-14 Thread Becky Mcquilling
Hi, all: I'm doing a tutorial online and I have run across an assignment to write a unit test. One of the tests is working fine, the other one is failing. The goal of this particular one is: 1) Create a directory 2) Create files in the directory that are listed in the text files 3) Crea