def METHOD_NAME(self):
    """
    Test empty lines preserved after edit
    """
    ini.set_option(self.tfile.name, {"SectionB": {"test3": "new value 3B"}})
    expected = os.linesep.join(
        [
            "# Comment on the first line",
            "",
            "# First main option",
            "option1 = main1",
            "",
            "# Second main option",
            "option2 = main2",
            "",
            "[main]",
            "# Another comment",
            "test1 = value 1",
            "",
            "test2 = value 2",
            "",
            "[SectionB]",
            "test1 = value 1B",
            "",
            "# Blank line should be above",
            "test3 = new value 3B",
            "",
            "[SectionC]",
            "# The following option is empty",
            "empty_option = ",
            "",
        ]
    )
    with salt.utils.files.fopen(self.tfile.name, "r") as fp_:
        file_content = salt.utils.stringutils.to_unicode(fp_.read())
    self.assertEqual(expected, file_content)