From 3d1c9c2f774e6fba841c1e72217e4e02044f0e60 Mon Sep 17 00:00:00 2001 From: tsukumi Date: Thu, 28 Nov 2024 17:11:56 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E3=83=86=E3=82=B9=E3=83=88=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- voicevox_engine/user_dict/user_dict_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/voicevox_engine/user_dict/user_dict_manager.py b/voicevox_engine/user_dict/user_dict_manager.py index a154a70..a60c24b 100644 --- a/voicevox_engine/user_dict/user_dict_manager.py +++ b/voicevox_engine/user_dict/user_dict_manager.py @@ -93,7 +93,8 @@ def __init__( self._is_pytest = "pytest" in sys.argv[0] or "py.test" in sys.argv[0] # 初回起動時などまだユーザー辞書 JSON が存在しない場合、辞書登録例として「担々麺」の辞書エントリを書き込む - if not self._user_dict_path.is_file(): + # pytest から実行されている場合は書き込まない + if not self._user_dict_path.is_file() and not self._is_pytest: self._write_to_json({ "担々麺": create_word(WordProperty( surface="担々麺",