@@ -33,11 +33,7 @@ def is_windows():
3333def test_url_input ():
3434 url = "https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar"
3535 onnx_path = converter (url , save_dir , is_del_raw = True )
36- md5_value = get_md5 (onnx_path )
37- if is_windows ():
38- assert md5_value == "877a502cf1c4817e8eb50d847f35dd6f"
39- else :
40- assert md5_value == "67ffba91f570b15f15ef2b9da9505e0b"
36+ assert Path (onnx_path ).exists ()
4137 shutil .rmtree (save_dir )
4238
4339
@@ -46,11 +42,7 @@ def test_local_input():
4642 tar_path = download_file (url , save_dir )
4743 onnx_path = converter (tar_path , save_dir , is_del_raw = True )
4844
49- md5_value = get_md5 (onnx_path )
50- if is_windows ():
51- assert md5_value == "877a502cf1c4817e8eb50d847f35dd6f"
52- else :
53- assert md5_value == "67ffba91f570b15f15ef2b9da9505e0b"
45+ assert Path (onnx_path ).exists ()
5446
5547 shutil .rmtree (save_dir )
5648
@@ -59,12 +51,9 @@ def test_rec_input():
5951 url = "https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar"
6052 txt_url = "https://gitee.com/paddlepaddle/PaddleOCR/raw/release/2.6/ppocr/utils/ppocr_keys_v1.txt"
6153 onnx_path = converter (url , save_dir , txt_path = txt_url , is_del_raw = True )
62- md5_value = get_md5 (onnx_path )
6354
64- if is_windows ():
65- assert md5_value == "e40e359fd082498ed30abf80223e8e05"
66- else :
67- assert md5_value == "0ba3af0828db6faa400612cf1b000965"
55+ assert Path (onnx_path ).exists ()
56+
6857 shutil .rmtree (save_dir )
6958
7059
@@ -75,11 +64,7 @@ def test_rec_input_local():
7564 txt_path = download_file (txt_url , save_dir )
7665
7766 onnx_path = converter (tar_path , save_dir , txt_path = txt_path , is_del_raw = True )
78- md5_value = get_md5 (onnx_path )
7967
80- if is_windows ():
81- assert md5_value == "e40e359fd082498ed30abf80223e8e05"
82- else :
83- assert md5_value == "0ba3af0828db6faa400612cf1b000965"
68+ assert Path (onnx_path ).exists ()
8469
8570 shutil .rmtree (save_dir )
0 commit comments