Update unit test to fix error and fix icon issue

This commit is contained in:
tzutalin 2021-04-10 08:23:28 -07:00
parent 62585531ca
commit ec23bb42ce
2 changed files with 4 additions and 6 deletions

View File

@ -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,

View File

@ -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