def METHOD_NAME(helpers, temp_dir):
    helpers.run_check_output(  # first run = create the line
        "pyinfra -v @local files.line _testfile someline",
        expected_lines=["@local] Success"],
        cwd=temp_dir,
    )
    helpers.run_check_output(  # second run = no changes
        "pyinfra -v @local files.line _testfile someline",
        expected_lines=["@local] No changes"],
        cwd=temp_dir,
    )
    helpers.run_check_output(  # replace the line
        "pyinfra -v @local files.line _testfile someline replace=anotherline",
        expected_lines=["@local] Success"],
        cwd=temp_dir,
    )
    helpers.run_check_output(  # second run replace the line = no changes
        "pyinfra -v @local files.line _testfile someline replace=anotherline",
        expected_lines=["@local] No changes"],
        cwd=temp_dir,
    )