-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathMakefile
27 lines (23 loc) · 1.12 KB
/
Makefile
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
build:
rm -rf dist
python3 setup.py sdist
# Coverage has to be run in this weird way. Why? mongoengine and internal python
# weirdness. Mongoengine relies on the value of pymongo.MongoClient to be set
# to either pymongo native or mongoengine BEFORE it gets imported. After import,
# mongoengine can't be deleted or reloaded or anything afterwards. So it needs to be
# run in different coverage runs. Then, the --concurrency flag needs to be set to
# have the coverage actually recorded before coverage combine.
# For the record, this is horrid.
test:
coverage run --concurrency=multiprocessing -m pytest tests/test_mongita.py -vx || exit 1
coverage run --concurrency=multiprocessing --append -m pytest tests/test_mongoengine.py -vx || exit 1
coverage run --concurrency=multiprocessing --append -m pytest tests/test_mongoengine_disk.py -vx || exit 1
coverage combine
coverage report --include="mongita/*.py,mongitasync"
coverage html --include="mongita/*.py,mongitasync"
loc_count_all:
pygount --format=summary . --suffix=py
loc_count:
pygount --format=summary mongita --suffix=py
benchmark:
python3 benchmark_tests/benchmark.py