Example #1
0
    def test_prepare_root_folder(self):
        RootFolder.prepare_folder(self.tmp_dir)

        files_and_folders = os.listdir(self.tmp_dir)

        self.assertIn(RootFolder.PO_FOLDER, files_and_folders)
        self.assertIn(RootFolder.TESTS_FOLDER, files_and_folders)

        self.assertIn(RootFolder.INIT_PY,
                      os.listdir(os.path.join(self.tmp_dir,
                                              RootFolder.PO_FOLDER)))

        self.assertNotIn(RootFolder.INIT_PY,
                         os.listdir(os.path.join(self.tmp_dir,
                                                 RootFolder.TESTS_FOLDER)))
    def test_prepare_root_folder(self):
        RootFolder.prepare_folder(self.tmp_dir)

        files_and_folders = os.listdir(self.tmp_dir)

        self.assertIn(RootFolder.PO_FOLDER, files_and_folders)
        self.assertIn(RootFolder.TESTS_FOLDER, files_and_folders)

        self.assertIn(
            RootFolder.INIT_PY,
            os.listdir(os.path.join(self.tmp_dir, RootFolder.PO_FOLDER)))

        self.assertNotIn(
            RootFolder.INIT_PY,
            os.listdir(os.path.join(self.tmp_dir, RootFolder.TESTS_FOLDER)))
Example #3
0
 def __set_root_folder(self, evt):
     dialog = DirDialog(self)
     if dialog.ShowModal() == ID_OK:
         path = dialog.GetPath()
         RootFolder.prepare_folder(path)
         self.__txt_root_path.SetValue(path)
Example #4
0
 def __set_root_folder(self, evt):
     dialog = DirDialog(self)
     if dialog.ShowModal() == ID_OK:
         path = dialog.GetPath()
         RootFolder.prepare_folder(path)
         self.__txt_root_path.SetValue(path)