From ec23bb42cef1036e8b1ee0913c40235e22c93931 Mon Sep 17 00:00:00 2001 From: tzutalin Date: Sat, 10 Apr 2021 08:23:28 -0700 Subject: [PATCH] Update unit test to fix error and fix icon issue --- labelImg.py | 6 ++---- tests/test_io.py | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/labelImg.py b/labelImg.py index c0a32b53..61dc7aa9 100755 --- a/labelImg.py +++ b/labelImg.py @@ -213,14 +213,12 @@ class MainWindow(QMainWindow, WindowMixin): open_dir = action(get_str('openDir'), self.open_dir_dialog, 'Ctrl+u', 'open', get_str('openDir')) - copy_prev_bounding = action(get_str('copyPrevBounding'), self.copy_previous_bounding_boxes, - 'Ctrl+v', 'paste', get_str('copyPrevBounding')) - change_save_dir = action(get_str('changeSaveDir'), self.change_save_dir_dialog, 'Ctrl+r', 'open', get_str('changeSavedAnnotationDir')) open_annotation = action(get_str('openAnnotation'), self.open_annotation_dialog, 'Ctrl+Shift+O', 'open', get_str('openAnnotationDetail')) + copy_prev_bounding = action(get_str('copyPrevBounding'), self.copy_previous_bounding_boxes, 'Ctrl+v', 'copy', get_str('copyPrevBounding')) open_next_image = action(get_str('nextImg'), self.open_next_image, 'd', 'next', get_str('nextImgDetail')) @@ -396,7 +394,7 @@ class MainWindow(QMainWindow, WindowMixin): self.display_label_option.triggered.connect(self.toggle_paint_labels_option) add_actions(self.menus.file, - (open, open_dir, copy_prev_bounding, change_save_dir, open_annotation, self.menus.recentFiles, save, save_format, save_as, close, reset_all, delete_image, quit)) + (open, open_dir, change_save_dir, open_annotation, copy_prev_bounding, self.menus.recentFiles, save, save_format, save_as, close, reset_all, delete_image, quit)) add_actions(self.menus.help, (help, show_info)) add_actions(self.menus.view, ( self.auto_saving, diff --git a/tests/test_io.py b/tests/test_io.py index ce733a49..242de53d 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -12,7 +12,7 @@ class TestPascalVocRW(unittest.TestCase): from pascal_voc_io import PascalVocReader # Test Write/Read - writer = PascalVocWriter('tests', 'test', (512, 512, 1), localImgPath='tests/test.512.512.bmp') + writer = PascalVocWriter('tests', 'test', (512, 512, 1), local_img_path='tests/test.512.512.bmp') difficult = 1 writer.add_bnd_box(60, 40, 430, 504, 'person', difficult) writer.add_bnd_box(113, 40, 450, 403, 'face', difficult) @@ -49,7 +49,7 @@ class TestCreateMLRW(unittest.TestCase): output_file = dir_name + "/tests.json" writer = CreateMLWriter('tests', 'test.512.512.bmp', (512, 512, 1), shapes, output_file, - localimgpath='tests/test.512.512.bmp') + local_img_path='tests/test.512.512.bmp') writer.write() # check written json