Exemple #1
0
    def test_listing_files_doesnt_include_directories(self):
        dir = os.path.join(self.temp_dir, 'test')
        os.mkdir(dir)

        all = []
        for f in files(self.temp_dir):
            all.append(f)
        self.assertEqual(self.test_files, all)
Exemple #2
0
    def test_listing_files_doesnt_include_directories(self):
        dir = os.path.join(self.temp_dir, "test")
        os.mkdir(dir)

        all = []
        for f in files(self.temp_dir):
            all.append(f)
        self.assertEqual(self.test_files, all)
Exemple #3
0
 def test_listing_all_files(self):
     all = []
     for f in files(self.temp_dir):
         all.append(f)
     self.assertEqual(self.test_files, all)
Exemple #4
0
 def test_listing_all_dot_pnms(self):
     pnms = []
     expected = ['test1.pnm', 'test2.pnm']
     for f in files(self.temp_dir, '.pnm'):
         pnms.append(f)
     self.assertEqual(pnms, expected)
Exemple #5
0
 def test_listing_all_pnms_doesnt_list_jpg(self):
     pnms = []
     for f in files(self.temp_dir, 'pnm'):
         pnms.append(f)
     self.assertNotIn('test3.jpg', pnms)
Exemple #6
0
 def test_listing_all_files(self):
     all = []
     for f in files(self.temp_dir):
         all.append(f)
     self.assertEqual(self.test_files, all)
Exemple #7
0
 def test_listing_all_dot_pnms(self):
     pnms = []
     expected = ["test1.pnm", "test2.pnm"]
     for f in files(self.temp_dir, ".pnm"):
         pnms.append(f)
     self.assertEqual(pnms, expected)
Exemple #8
0
 def test_listing_all_pnms_doesnt_list_jpg(self):
     pnms = []
     for f in files(self.temp_dir, "pnm"):
         pnms.append(f)
     self.assertNotIn("test3.jpg", pnms)