Beispiel #1
0
 def test_load_confgi(self):
     config_file_parent = self.config_file.parent
     cy = ConfigYAML(str(self.config_file), True)
     cp = CollectPwd()
     # pp(cy.config)
     cy.enum_config(cp)
     # pp("collect config file's pwd is {pwd_list}".format(pwd_list=cp.pwd_list))
     self.assertEqual([str(config_file_parent.joinpath("append")), str(config_file_parent)], cp.pwd_list)
     self.assertEqual(
         ['test.py',
          # 'special_dir/data.txt',
          # 'special_dir/sub_dir/data.txt',
          'contain_special_data.txt',
          ],
         cy.fit_file_list
     )
     self.assertEqual(["special_dir"], cy.fit_dir)
     caff = CollectAllFitFile()
     cy.enum_config(caff)
     # pp(caff.all_fit_file)
     self.assertEqual(caff.all_fit_file,
                      [
                          # 'special_dir/sub_dir/data.txt',
                          'contain_special_data.txt',
                          'test.py',
                          # 'special_dir/data.txt',
                          # 'special_dir/sub_dir/data.txt',
                          'contain_special_data.txt'
                      ])
     cafd = CollectAllFitDir()
     cy.enum_config(cafd)
     self.assertEqual(cafd.all_fit_dir,
                      [
                          "special_dir/sub_dir",
                          "special_dir",
                      ])
Beispiel #2
0
 def test_real_git_cleaner(self):
     cy = ConfigYAML(str(self.real_config), True)
     # print(cy.fit_dir)
     cy.enum_config(lambda config:config.clean_git())