Skip to content

Commit 34c20ea

Browse files
committed
Add some basic environment for writing/checking tests
1 parent 8c85c20 commit 34c20ea

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

.coveragerc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[report]
2+
3+
exclude_lines =
4+
if __name__ == .__main__.:

makefile

+3
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ dependencies:
1919
if [ ! -d $(ROOT_DIR)/env ]; then python3 -m venv $(ROOT_DIR)/env; fi
2020
source $(ROOT_DIR)/env/bin/activate; yes w | python -m pip install -e .[dev]
2121

22+
test:
23+
python setup.py test
24+
2225
package:
2326
source $(ROOT_DIR)/env/bin/activate; python setup.py bdist_wheel

setup.cfg

+7
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
[metadata]
22
description-file = README.md
3+
4+
[aliases]
5+
test=pytest
6+
7+
[tool:pytest]
8+
addopts = --cov=gitconsensus --cov-report term-missing
9+
python_files = tests/*.py

setup.py

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
],
5050
},
5151

52+
setup_requires=["pytest-runner"],
53+
tests_require=["freezegun", "pytest", "pytest-cov", "pytest-mock"],
54+
5255
entry_points={
5356
'console_scripts': [
5457
'gitconsensus=gitconsensus.gitconsensus:cli',

0 commit comments

Comments
 (0)