def METHOD_NAME(self):
    """
    Test the IDF.save() function with combinations of encodings and line
    endings.
    """
    idf = IDF(self.startfile)
    lineendings = ("windows", "unix", "default")
    encodings = ("ascii", "latin-1", "UTF-8")
    for le, enc in product(lineendings, encodings):
        idf.save(lineendings=le, encoding=enc)
        with open(self.startfile, "rb") as sf:
            result = sf.read()
        if le == "windows":
            assert b"\r\n" in result
        elif le == "unix":
            assert b"\r\n" not in result
        elif le == "default":
            assert os.linesep.encode(enc) in result