示例#1
0
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'}
示例#2
0
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')