-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
run-tests.sh
37 lines (31 loc) · 1.27 KB
/
run-tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## (1) Test dependencies (run this part only the first time).
# If using zsh, install using '\', i.e. `pip install -e .\[full\]`
# pip install -e .[full]
## (1.1) Install pytest dependencies
# pip install -r requirements-test.txt
## (1.2) Install flake8 dependencies
# pip install -r requirements-flake.txt
## (1.3) Generate chats for test
# mkdir -p tests/chats/hformats tests/chats/merge
# whatstk-generate-chat --size 500 -z --output-path tests/chats/hformats/
# whatstk-generate-chat --size 300 -z --last-timestamp 2019-09-01 \
# --hformats '%Y-%m-%d, %H:%M - %name:' \
# --output-path tests/chats/merge/ --filenames file1.txt
# whatstk-generate-chat --size 300 -z --last-timestamp 2020-01-01 \
# --hformats '%Y-%m-%d, %H:%M - %name:' \
# --output-path tests/chats/merge/ --filenames file2.txt
## (2) Run flake
flake8 \
--max-complexity 10\
--docstring-convention=google\
--format=html --htmldir=reports/flake-report\
--max-line-length=120\
--ignore=ANN101,ANN102,AN401\
whatstk
## (3) Run tests
py.test \
--html=reports/testreport.html\
--cov-report html:reports/htmlcov\
--cov-report term\
--cov-report xml:reports/cov.xml\
--cov=whatstk tests