def extract_substructure_for_test(test_case, substructure, config):
 try:
  return extract_substructure(config, substructure)
 except MissingConfigError as e:
  yaml.add_representer(Optional, (lambda d, x: d.represent_scalar(u'tag:yaml.org,2002:str', repr(x))))
  test_case.skip('Skipping test: could not get configuration: {}\n\nIn order to run this test, add ensure file at $ACCEPTANCE_YAML has structure like:\n\n{}'.format(e.message, yaml.dump(substructure, default_flow_style=False)))

def extract_substructure_for_test ( test_case , substructure , config ) : try : return extract_substructure ( config , substructure ) except MissingConfigError as e : yaml . add_representer ( Optional , ( lambda d , x : d . represent_scalar ( u'tag:yaml.org,2002:str' , repr ( x ) ) ) ) test_case . skip ( 'Skipping test: could not get configuration: {}\n\nIn order to run this test, add ensure file at $ACCEPTANCE_YAML has structure like:\n\n{}' . format ( e . message , yaml . dump ( substructure , default_flow_style = False ) ) )
extract the keys from the config in substructure .