def test_invalid_config():
 with pytest.raises(InvalidConfiguration) as excinfo:
  config.get_config('tests/test-config/invalid-config.yaml')
 expected_error_msg = 'Unable to parse YAML file tests/test-config/invalid-config.yaml. Error: '
 assert (expected_error_msg in str(excinfo.value))

def test_invalid_config ( ) : with pytest . raises ( InvalidConfiguration ) as excinfo : config . get_config ( 'tests/test-config/invalid-config.yaml' ) expected_error_msg = 'Unable to parse YAML file tests/test-config/invalid-config.yaml. Error: ' assert ( expected_error_msg in str ( excinfo . value ) )
an invalid config file should raise an invalidconfiguration exception .