commit 5c35db371a89159452413a55b107cc7a576fe471 parent cbcb2b9acb52fd4049922c1978d88002b56e6e2e Author: parazyd <parazyd@dyne.org> Date: Fri, 16 Apr 2021 10:40:18 +0200 Add a Makefile for utility functions. Diffstat:
M | .gitignore | | | 4 | ++-- |
A | Makefile | | | 15 | +++++++++++++++ |
A | tests/__main__.py | | | 4 | ++++ |
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore @@ -1 +1,2 @@ -*.pyc- \ No newline at end of file +*.pyc +.coverage diff --git a/Makefile b/Makefile @@ -0,0 +1,15 @@ +all: + @echo "Available targets" + @echo "make format - Format code" + @echo "make test - Run test units" + @echo "make coverage - Run test units and report code coverage" + +format: + python3 ./res/format_code.py + +test: + python3 ./tests/test_electrum_protocol.py + +coverage: + coverage run tests + coverage report diff --git a/tests/__main__.py b/tests/__main__.py @@ -0,0 +1,3 @@ +import asyncio +from test_electrum_protocol import main +asyncio.run(main())+ \ No newline at end of file