def test_json(tmpdir): conf = tmpdir.join("conf.json") conf.write('{"a": "b", "c": 3}') assert _load_config(str(conf)) == {"a": "b", "c": 3}
def test_load_empty_yaml(tmpdir): pytest.importorskip("ruamel.yaml") conf = tmpdir.join("conf.yaml") conf.write("") assert _load_config(str(conf)) == {}
def test_json(tmpdir): conf = tmpdir.join('conf.json') conf.write('{"a": "b", "c": 3}') assert _load_config(str(conf)) == {'a': 'b', 'c': 3}
def test_yaml(tmpdir): pytest.importorskip("ruamel.yaml") conf = tmpdir.join("conf.yaml") conf.write("a: b\nc: 3") assert _load_config(str(conf)) == {"a": "b", "c": 3}
def test_yaml(tmpdir): pytest.importorskip('ruamel.yaml') conf = tmpdir.join('conf.yaml') conf.write('a: b\nc: 3') assert _load_config(str(conf)) == {'a': 'b', 'c': 3}