Skip to content

Commit

Permalink
fix the build error on setup.py test
Browse files Browse the repository at this point in the history
  • Loading branch information
taku910 committed Aug 17, 2024
1 parent 0f544b3 commit 51f9ced
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ pip
setuptools
wheel
twine
pytest
1 change: 1 addition & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,5 @@ def get_win_arch():
'Topic :: Software Development :: Libraries :: Python Modules',
],
test_suite='sentencepiece_test.suite',
tests_require=['pytest'],
)
5 changes: 4 additions & 1 deletion python/test/sentencepiece_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 51f9ced

Please sign in to comment.