You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PaddleSpeech/third_party/python-pinyin/tests/conftest.py

14 lines
327 B

import os
import pytest
@pytest.fixture(autouse=True, scope='function')
def setup():
os.environ.pop('PYPINYIN_NO_PHRASES', None)
os.environ.pop('PYPINYIN_NO_DICT_COPY', None)
try:
yield
finally:
os.environ.pop('PYPINYIN_NO_PHRASES', None)
os.environ.pop('PYPINYIN_NO_DICT_COPY', None)