Commit 55c6163d authored by andy.disch's avatar andy.disch

test hook

parent 1cb2a31a
......@@ -346,25 +346,37 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## hooks for unittests (or use a continuous-integration server)"
"### PyCharm\n",
"\n",
"use test runner to explore results"
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"pip install python-githooks"
"## hooks for unittests (or use a continuous-integration server)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### PyCharm\n",
"go to: C:\\Users\\dischand\\PycharmProjects\\examplepydebuggingandtesting\\.git\\hooks\n",
"\n",
"use test runner to explore results"
"\n",
"#!/bin/sh\n",
"\n",
"if [[ `python -m unittest C:/Users/dischand/PycharmProjects/examplepydebuggingandtesting/tests/test_urban_drainage_ts.py` ]]\n",
"then\n",
"\techo \"> Tests DID NOT pass !\"\n",
"\texit 1\n",
"else\n",
"\techo \"> Tests passed !\"\n",
"fi\n",
"\n",
"echo \"Ready to commit !\"\n",
"exit 0"
]
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment