diff --git a/plantcv/annotate/classes.py b/plantcv/annotate/classes.py index 62945f9..1a66e78 100644 --- a/plantcv/annotate/classes.py +++ b/plantcv/annotate/classes.py @@ -99,15 +99,15 @@ def onclick(self, event): self.sample_labels.pop(idx_remove) self.fig.canvas.draw() - def print_coords(self, outfile): + def print_coords(self, filename): """Save collected coordinates to a file. Input variables: - outfile = Name of the file to save collected coordinate + filename = Name of the file to save collected coordinate :param filename: str :return: """ # Open the file for writing - with open(outfile, "w") as fp: + with open(filename, "w") as fp: # Save the data in JSON format with indentation json.dump(obj=self.coords, fp=fp, indent=4) diff --git a/tests/test_annotate_points.py b/tests/test_annotate_points.py index 1373f11..f3b91e1 100644 --- a/tests/test_annotate_points.py +++ b/tests/test_annotate_points.py @@ -72,7 +72,7 @@ def test_points_print_coords(test_data, tmpdir): drawer_rgb.onclick(e2) # Save collected coords out - drawer_rgb.print_coords(outfile=filename) + drawer_rgb.print_coords(filename) assert os.path.exists(filename) def test_points_import_list(test_data):