Beispiel #1
0
 def wrapper(*args, **kwargs):
     self = args[0]
     get_logger().info(
         "[info]Running [scenario]%s[/] > [action]%s[/][/]",
         self._config.scenario.name,
         underscore(self.__class__.__name__),
         extra={"markup": True},
     )
     rt = func(*args, **kwargs)
     # section close code goes here
     return rt
Beispiel #2
0
 def wrapper(*args, **kwargs):
     self = args[0]
     scenario = self._config.scenario.name
     subcommand = underscore(self.__class__.__name__)
     console.print(
         "::group::",
         f"[ci_info]Molecule[/] [scenario]{scenario}[/] > [action]{subcommand}[/]",
         sep="",
         markup=True,
         emoji=False,
         highlight=False,
     )
     try:
         return func(*args, **kwargs)
     finally:
         console.print("::endgroup::",
                       markup=True,
                       emoji=False,
                       highlight=False)
Beispiel #3
0
def test_underscore():
    assert "foo" == underscore("Foo")
    assert "foo_bar" == underscore("FooBar")
    assert "foo_bar_baz" == underscore("FooBarBaz")