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]
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
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")
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")