From 998cc7ec48549d127920962cc1f131cbc29db642 Mon Sep 17 00:00:00 2001 From: aboutmydreams Date: Tue, 24 Sep 2024 13:54:58 +0800 Subject: [PATCH] fix: add open sans fony as defuat font in test file --- setup.py | 2 +- tests/test.py | 4 ++-- tests/test_train_img.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 22dc74f..d5f9a0d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pycapt", - version="1.0.18", + version="1.0.19", author="aboutmydreams", author_email="aboutmydreams@163.com", description="a library that processes verification codes", diff --git a/tests/test.py b/tests/test.py index f66d104..7dd7820 100644 --- a/tests/test.py +++ b/tests/test.py @@ -47,7 +47,7 @@ num_of_str=4, font=30, gray_value=255, - font_family='ヒラギノ角ゴシック W8.ttc') + font_family='OpenSans-Bold.ttf') # pycapt.get_train_img() @@ -88,7 +88,7 @@ def contrast(num): noise_N=0.3, noise_Z=2, gray_value=255, - font_family='ヒラギノ角ゴシック W8.ttc') + font_family='OpenSans-Bold.ttf') print(file_name) img.show() diff --git a/tests/test_train_img.py b/tests/test_train_img.py index 267e2ed..79a595f 100644 --- a/tests/test_train_img.py +++ b/tests/test_train_img.py @@ -25,7 +25,7 @@ def test_generate_captcha_image(self): num_of_str=4, font=30, gray_value=255, - font_family="OpenSans-Bold.ttf", + font_family=None, ) img.save(self.image_path) # Save the generated image