import unittest
from office.api.testApi.ruiming import screen_unmarked_image, change_label_in_xml, screen_without_label_json_file
from tests.test_utils.comm_utils import *
class TestRuiming(unittest.TestCase):
def test_screen_unmarked_image(self):
screen_unmarked_image(dir_path='../test_files/ruiming/screen_unmarked_image')
def test_change_label_in_xml(self):
change_label_in_xml(dir_path="../test_files/ruiming/change_label_in_xml", old_label="测试", new_label="测试1")
file_names = get_file_by_suffix('../test_files/ruiming/change_label_in_xml', 'xml')
for file_name in file_names:
names = get_all_name_values('../test_files/ruiming/change_label_in_xml/' + file_name)
self.assertNotIn('测试', names)
change_label_in_xml(dir_path="../test_files/ruiming/change_label_in_xml", old_label="测试1", new_label="测试")
def test_screen_without_label_json_file(self):
screen_without_label_json_file(dir_path="../test_files/ruiming/screen_without_label_json_file")