Skip to content

Commit a4ee295

Browse files
committed
add pytest.ini tpl file & sync ci conf
1 parent 7bf26e7 commit a4ee295

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
cd ~/haha
6666
flask db init && flask db migrate && flask db upgrade
6767
flake8 . --exclude migrations
68-
py.test --cov . --cov-report term-missing -s
68+
py.test
6969
test-py36:
7070
docker:
7171
- image: circleci/python:3.6
@@ -97,7 +97,7 @@ jobs:
9797
cd ~/haha
9898
flask db init && flask db migrate && flask db upgrade
9999
flake8 . --exclude migrations
100-
py.test --cov . --cov-report term-missing -s
100+
py.test
101101
test-py37:
102102
docker:
103103
- image: circleci/python:3.7
@@ -131,7 +131,7 @@ jobs:
131131
cd ~/haha
132132
flask db init && flask db migrate && flask db upgrade
133133
flake8 . --exclude migrations
134-
py.test --cov . --cov-report term-missing -s
134+
py.test
135135
136136
workflows:
137137
version: 2
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[pytest]
2+
env =
3+
LASK_APP=app/run.py
4+
FLASK_ENV=testing
5+
addopts = --cov . --cov-report term-missing -s -x -v -p no:warnings

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def gen_data(data_root='hobbit/static/bootstrap'):
2121

2222

2323
package_data = gen_data()
24-
assert len(package_data) == 26, \
24+
assert len(package_data) == 27, \
2525
'nums of tepl files error, {}'.format(len(package_data))
2626

2727

tests/test_hobbit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_startproject_cmd_example(self):
8686
'--echo', 'startproject', '-n', 'haha', '--example',
8787
'-p', '1024',
8888
], obj={})
89-
# start + 26 files + 10 dir + 1 end + empty
90-
assert len(result.output.split('\n')) == 1 + 10 + 26 + 1 + 1
89+
# start + 27 files + 10 dir + 1 end + empty
90+
assert len(result.output.split('\n')) == 1 + 10 + 27 + 1 + 1
9191
assert result.exit_code == 0
9292
assert 'example.py' in result.output

0 commit comments

Comments
 (0)