def test_num_files(self): d = Dir(self.temp_dir) self.assertEqual(len(list(d.walk("f"))), self.num_files)
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))
def test_num_children(self): d = Dir(self.temp_dir) self.assertEqual(len(list(d.children())), (self.num_files + self.num_dirs))