Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_config_to_dict(teamocil_yaml, teamocil_dict, tmuxp_dict):
configparser = kaptan.Kaptan(handler='yaml')
test_config = configparser.import_config(teamocil_yaml)
yaml_to_dict = test_config.get()
assert yaml_to_dict == teamocil_dict
assert config.import_teamocil(teamocil_dict) == tmuxp_dict
config.validate_schema(config.import_teamocil(teamocil_dict))
def test_multisession_config(session_name, expected, multisession_config):
# teamocil can fit multiple sessions in a config
assert config.import_teamocil(multisession_config[session_name]) == expected
config.validate_schema(config.import_teamocil(multisession_config[session_name]))
def test_config_to_dict(teamocil_yaml, teamocil_dict, tmuxp_dict):
configparser = kaptan.Kaptan(handler='yaml')
test_config = configparser.import_config(teamocil_yaml)
yaml_to_dict = test_config.get()
assert yaml_to_dict == teamocil_dict
assert config.import_teamocil(teamocil_dict) == tmuxp_dict
config.validate_schema(config.import_teamocil(teamocil_dict))
def test_multisession_config(session_name, expected, multisession_config):
# teamocil can fit multiple sessions in a config
assert config.import_teamocil(multisession_config[session_name]) == expected
config.validate_schema(config.import_teamocil(multisession_config[session_name]))
def command_import_teamocil(configfile):
"""Convert a teamocil config from CONFIGFILE to tmuxp format and import
it into tmuxp."""
import_config(configfile, config.import_teamocil)