def METHOD_NAME(self):
    """Test that labels are properly used."""
    self.plot.setGraphXLabel("graph x label")
    self.plot.setGraphYLabel("graph y label")
    self.plot.addCurve([0, 1], [1, 2], "curve with labels",
                       xlabel="curve0 X", ylabel="curve0 Y")
    self.plot.addCurve([-1, 3], [-6, 2], "curve with X label",
                       xlabel="curve1 X")
    self.plot.addCurve([-2, 0], [8, 12], "curve with Y label",
                       ylabel="curve2 Y")
    self.plot.addCurve([3, 1], [7, 6], "curve with no labels")
    self.saveAction._saveCurves(self.plot,
                                self.out_fname,
                                SaveAction.DEFAULT_ALL_CURVES_FILTERS[0])  # "All curves as SpecFile (*.dat)"
    with open(self.out_fname, "rb") as f:
        file_content = f.read()
        if hasattr(file_content, "decode"):
            file_content = file_content.decode()
        # case with all curve labels specified
        self.assertIn("#S 1 curve0 Y", file_content)
        self.assertIn("#L curve0 X  curve0 Y", file_content)
        # graph X&Y labels are used when no curve label is specified
        self.assertIn("#S 2 graph y label", file_content)
        self.assertIn("#L curve1 X  graph y label", file_content)
        self.assertIn("#S 3 curve2 Y", file_content)
        self.assertIn("#L graph x label  curve2 Y", file_content)
        self.assertIn("#S 4 graph y label", file_content)
        self.assertIn("#L graph x label  graph y label", file_content)