Ejemplo n.º 1
0
def test_check_config_consistency_fails():
    path = os.path.join(TEST_DIR, "example.krun")
    config = Config(path)
    with open(path) as fp:
        config_string = fp.read()
    with pytest.raises(Exception) as excinfo:
        config.check_config_consistency(
            config_string + "\n# different config!", "fakefilename")
    assert "+# different config!" in excinfo.value.args[0]
Ejemplo n.º 2
0
def test_check_config_consistency_fails():
    path = os.path.join(TEST_DIR, "example.krun")
    config = Config(path)
    with open(path) as fp:
        config_string = fp.read()
    with pytest.raises(Exception) as excinfo:
        config.check_config_consistency(config_string + "\n# different config!",
                                        "fakefilename")
    print excinfo.value.message
    assert "+# different config!" in excinfo.value.message
Ejemplo n.º 3
0
def test_check_config_consistency():
    path = os.path.join(TEST_DIR, "example.krun")
    config = Config(path)
    with open(path) as fp:
        config_string = fp.read()
    config.check_config_consistency(config_string, "fakefilename")
Ejemplo n.º 4
0
def test_check_config_consistency():
    path = os.path.join(TEST_DIR, "example.krun")
    config = Config(path)
    with open(path) as fp:
        config_string = fp.read()
    config.check_config_consistency(config_string, "fakefilename")