def test_input_section(): with patch('glob.glob', glob.glob): parser = ConfigParser() parser._read_config(yaml.load(TEST_CONFIG)) assert parser.get('input', 'files') == ALL_EXISTING_FILES assert parser.get('input', 'sample') == { 'name': 'Data', 'title': '2016 Data'}
def test_general_section(): with patch('glob.glob', glob.glob): parser = ConfigParser() parser._read_config(yaml.load(TEST_CONFIG)) assert_equal(parser.get('general', 'version'), '0.0.1') assert_equal(parser.get('general', 'name'), 'Benchmark')