def i_check_if_the_output_is_like_expected_file(step, expected_file):
    file = open(res_filename(expected_file), "rb")
    expected_content = file.read()
    file.close()
    if world.output == expected_content:
        assert True
    else:
        assert False, "Found:\n%s\n\nExpected:\n%s\n\n" % (world.output,
                                                           expected_content)
def i_check_if_the_output_is_like_expected_file(step, expected_file):
    file = open(res_filename(expected_file), "rb")
    expected_content = file.read()
    file.close()
    if world.output.strip() == expected_content.strip():
        assert True
    else:
        assert False, "Found:\n%s\n\nExpected:\n%s\n\n" % (world.output,
                                                           expected_content)
def i_check_if_the_output_is_like_expected_file(step, expected_file):
    file = open(res_filename(expected_file), "r")
    expected_content = file.read()
    file.close()
    eq_(world.output.strip(), expected_content.strip())
def update_content(filename, content):
    with open(res_filename(filename), "w") as file_handler:
        file_handler.write(content)
def i_check_if_the_output_is_like_expected_file(step, expected_file):
    file = open(res_filename(expected_file), "rb")
    expected_content = file.read()
    file.close()
    eq_(world.output.strip(), expected_content.strip())
Beispiel #6
0
def update_content(filename, content):
    with open(res_filename(filename), "w") as file_handler:
        file_handler.write(content)