Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Jan 2, 2016
1 parent 6d9a1a5 commit 51688dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ help:
.PHONY: test
test:
@echo "run test"
py.test --cov pypinyin tests/
py.test --cov pypinyin tests/ && py.test --cov pypinyin/core.py tests/_test_env.py

.PHONY: register
register:
Expand Down
8 changes: 4 additions & 4 deletions tests/_test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
os.environ['PYPINYIN_NO_PHRASES'] = 'true'
os.environ['PYPINYIN_NO_JIEBA'] = 'true'

import pypinyin
import pypinyin.core


def test_env():
assert pypinyin.PHRASES_DICT == {}
assert pypinyin.seg.no_jieba
assert pypinyin.seg('北京') == ['北京']
assert pypinyin.core.PHRASES_DICT == {}
assert pypinyin.core.seg.no_jieba
assert pypinyin.core.seg('北京') == ['北京']
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ deps =
setenv =
PYPINYIN_NO_PHRASES = true
PYPINYIN_NO_JIEBA = true
commands = py.test --cov pypinyin/__init__.py tests/_test_env.py
commands = py.test --cov pypinyin/core.py tests/_test_env.py

0 comments on commit 51688dd

Please sign in to comment.