Exemple #1
0
def test_pascal_case():
    res = tools.pascal_case("PowerShell Remoting")
    assert res == "PowerShellRemoting"
    res = tools.pascal_case("good life")
    assert res == "GoodLife"
    res = tools.pascal_case("good_life-here v2")
    assert res == "GoodLifeHereV2"
Exemple #2
0
 def get_output_path(self):
     """Get processed output path
     """
     output_path = os.path.abspath(self.output)
     if self.autocreate_dir and (output_path.endswith("Integrations") or output_path.endswith("Scripts")):
         code_name = self.yml_data.get("name")
         if not code_name:
             raise ValueError(f'Failed determining Integration/Script name when trying to auto create sub dir at: {output_path}'
                              '\nRun with option --no-auto-create-dir to skip auto creation of target dir.')
         output_path += (os.path.sep + pascal_case(code_name))
     return output_path
Exemple #3
0
 def get_output_path(self):
     """Get processed output path
     """
     output_path = Path(self.output)
     if self.autocreate_dir and output_path.name in {'Integrations', 'Scripts'}:
         code_name = self.yml_data.get("name")
         if not code_name:
             raise ValueError(f'Failed determining Integration/Script name when trying to auto create sub dir at: {self.output}'
                              '\nRun with option --no-auto-create-dir to skip auto creation of target dir.')
         output_path = output_path / pascal_case(code_name)
     return output_path