fix the build error on setup.py test

This commit is contained in:
Taku Kudo 2024-08-17 10:21:14 +00:00
parent 0f544b32d9
commit 51f9ced579
4 changed files with 7 additions and 2 deletions

View File

@ -63,7 +63,7 @@ jobs:
working-directory: ${{github.workspace}}/python
run: |
python -m pip install --require-hashes --no-dependencies -r ../.github/workflows/requirements/base.txt
python setup.py test
python -m pytest
python setup.py bdist_wheel
- name: Upload artifcacts

View File

@ -2,3 +2,4 @@ pip
setuptools
wheel
twine
pytest

View File

@ -211,4 +211,5 @@ setup(
'Topic :: Software Development :: Libraries :: Python Modules',
],
test_suite='sentencepiece_test.suite',
tests_require=['pytest'],
)

View File

@ -15,11 +15,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.!
import sys
sys.path.insert(0, 'src')
from collections import defaultdict
import io
import os
import pickle
import sys
import unittest
import sentencepiece as spm