Beispiel #1
0
 def test_num_files(self):
     d = Dir(self.temp_dir)
     self.assertEqual(len(list(d.walk("f"))), self.num_files)
Beispiel #2
0
 def test_transform_dir_to_path(self):
     dir_ = Dir(self.path_str)
     self.assertEqual(dir_.transform(), Path(self.path_str))
     self.assertTrue(isinstance(dir_.transform(), Path))
Beispiel #3
0
 def test_num_children(self):
     d = Dir(self.temp_dir)
     self.assertEqual(len(list(d.children())), (self.num_files + self.num_dirs))