mirror of https://github.com/dirtbags/moth.git
Setting up testing environment
This commit is contained in:
parent
3fa6d1947a
commit
a75d7fc3be
File diff suppressed because it is too large
Load Diff
|
@ -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}
|
|
@ -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
|
|
@ -19,7 +19,7 @@ setup(
|
||||||
"pillow": ["Pillow>=5.4.1"],
|
"pillow": ["Pillow>=5.4.1"],
|
||||||
"full": ["scapy>=2.5.2", "Pillow>=5.4.1"],
|
"full": ["scapy>=2.5.2", "Pillow>=5.4.1"],
|
||||||
},
|
},
|
||||||
test_requires = [
|
tests_require = [
|
||||||
"coverage==4.5.3",
|
"coverage==4.5.3",
|
||||||
"flake8==3.7.7",
|
"flake8==3.7.7",
|
||||||
"frosted==1.4.1",
|
"frosted==1.4.1",
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue