Пример #1
0
    def _check_module(self):
        """If module name is not provided, try to find one according to the
       recommended project organization"""
        if self.module_name is None:
            self.module_name = '../t{}.py'.format(
                re_find_single(r'(?<=s)\d+_\w+(?=.py)'))
            console.show_status('Module set to `{}`'.format(self.module_name))

        if not os.path.exists(self.module_name):
            raise AssertionError('!! module {} does not exist'.format(
                self.module_name))
Пример #2
0
 def default_summ_name(self):
     script_name = re_find_single(r's\d+_\w+(?=.py)')
     return '{}_{}'.format(date_string(), script_name)