1 Star 5 Fork 1

open-source/labelGo-Yolov5AutoLabelImg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test_utils.py 723 Bytes
一键复制 编辑 原始数据 按行查看 历史
saiki 提交于 4年前 . Initial commit
import os
import sys
import unittest
from libs.utils import Struct, new_action, new_icon, add_actions, format_shortcut, generate_color_by_text, natural_sort
class TestUtils(unittest.TestCase):
def test_generateColorByGivingUniceText_noError(self):
res = generate_color_by_text(u'\u958B\u555F\u76EE\u9304')
self.assertTrue(res.green() >= 0)
self.assertTrue(res.red() >= 0)
self.assertTrue(res.blue() >= 0)
def test_nautalSort_noError(self):
l1 = ['f1', 'f11', 'f3']
expected_l1 = ['f1', 'f3', 'f11']
natural_sort(l1)
for idx, val in enumerate(l1):
self.assertTrue(val == expected_l1[idx])
if __name__ == '__main__':
unittest.main()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/python-open-source/labelGo-Yolov5AutoLabelImg.git
git@gitee.com:python-open-source/labelGo-Yolov5AutoLabelImg.git
python-open-source
labelGo-Yolov5AutoLabelImg
labelGo-Yolov5AutoLabelImg
master

搜索帮助