mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-25 20:11:40 +01:00
Import mypy configuration script and run scripts (for Python 2.7 and 3.5).
Import pytest coverage script.
This commit is contained in:
parent
fabb4b5bb2
commit
ca6cfb81a2
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
*~
|
*~
|
||||||
*.pyc
|
*.pyc
|
||||||
|
./html/
|
||||||
|
10
test/coverage.sh
Executable file
10
test/coverage.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
_cdir=$(cd -- "$(dirname "$0")" && pwd)
|
||||||
|
type py.test > /dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "err: py.test (Python testing framework) not found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd -- "${_cdir}/.."
|
||||||
|
mkdir -p html
|
||||||
|
py.test -v --cov-report=html:html/coverage --cov=ssh-audit test
|
10
test/mypy-py2.sh
Executable file
10
test/mypy-py2.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
_cdir=$(cd -- "$(dirname "$0")" && pwd)
|
||||||
|
type mypy > /dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "err: mypy (Optional Static Typing for Python) not found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
_htmldir="${_cdir}/../html/mypy-py2"
|
||||||
|
mkdir -p "${_htmldir}"
|
||||||
|
mypy --python-version 2.7 --config-file "${_cdir}/mypy.ini" --html-report "${_htmldir}" "${_cdir}/../ssh-audit.py"
|
10
test/mypy-py3.sh
Executable file
10
test/mypy-py3.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
_cdir=$(cd -- "$(dirname "$0")" && pwd)
|
||||||
|
type mypy > /dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "err: mypy (Optional Static Typing for Python) not found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
_htmldir="${_cdir}/../html/mypy-py3"
|
||||||
|
mkdir -p "${_htmldir}"
|
||||||
|
mypy --python-version 3.5 --config-file "${_cdir}/mypy.ini" --html-report "${_htmldir}" "${_cdir}/../ssh-audit.py"
|
9
test/mypy.ini
Normal file
9
test/mypy.ini
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[mypy]
|
||||||
|
silent_imports = True
|
||||||
|
disallow_untyped_calls = True
|
||||||
|
disallow_untyped_defs = True
|
||||||
|
check_untyped_defs = True
|
||||||
|
disallow-subclassing-any = True
|
||||||
|
warn-incomplete-stub = True
|
||||||
|
warn-redundant-casts = True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user