Setting up testing environment

This commit is contained in:
Donaldson 2020-10-15 16:04:07 -05:00
parent 3fa6d1947a
commit a75d7fc3be
5 changed files with 51 additions and 1191 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
#!/bin/sh
set +e
url='https://rawgit.com/first20hours/google-10000-english/master/google-10000-english-no-swears.txt'
getter="curl -sL"
fn="answer_words.txt"
filterer() {
grep '......*'
}
if ! curl -h >/dev/null 2>/dev/null; then
getter="wget -q -O -"
elif ! wget -h >/dev/null 2>/dev/null; then
echo "[!] I don't know how to download. I need curl or wget."
fi
$getter "${url}" | filterer > ${fn}.tmp \
&& mv -f ${fn}.tmp ${fn}

13
contrib/python/setup.cfg Normal file
View File

@ -0,0 +1,13 @@
[nosetests]
with-coverage=1
cover-package=moth
cover-branches=1
[flake8]
# flake8 is an automated code formatting pedant.
# Use it, please.
#
# python3 -m flake8 .
#
ignore = E501
exclude = .git

View File

@ -19,7 +19,7 @@ setup(
"pillow": ["Pillow>=5.4.1"],
"full": ["scapy>=2.5.2", "Pillow>=5.4.1"],
},
test_requires = [
tests_require = [
"coverage==4.5.3",
"flake8==3.7.7",
"frosted==1.4.1",

18
contrib/python/tox.ini Normal file
View File

@ -0,0 +1,18 @@
[tox]
envlist = py38
[testenv]
deps = nose>=1.3.7
coverage==4.5.3
pylint>=2.6.0
flake8>=3.8.4
vulture>=2.1
bandit>=1.6
dodgy>=0.2
commands =
pylint moth --disable=C0301
flake8 moth
vulture moth --min-confidence 70
bandit -r moth
dodgy