diff --git a/.travis.yml b/.travis.yml index 768a9e6..d3e85d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,9 @@ python: - '2.7' - '3.3' install: -- pip install -r requirements.txt +- pip install -r test_requirements.txt - pip install coveralls +before_script: ./check.sh script: coverage run --source=pylast ./test_pylast.py after_success: coveralls diff --git a/README.md b/README.md index 9e5c942..dbc04bb 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ export PYLAST_API_SECRET=TODO_ENTER_YOURS_HERE To run all: ``` -pip install pyyaml +pip install -r test_requirements.txt ./test_pylast.py ``` @@ -105,9 +105,13 @@ Or all those tests matching a term: To run with coverage: ``` -pip install coverage coverage run --source=pylast ./test_pylast.py coverage report # for command-line report coverage html # for HTML report open htmlcov/index.html ``` + +To perform some static analysis: +``` +./check.sh +``` diff --git a/check.sh b/check.sh new file mode 100755 index 0000000..c9dad2e --- /dev/null +++ b/check.sh @@ -0,0 +1,11 @@ +pyflakes pylast.py +echo --- +pyflakes test_pylast.py +echo --- +pep8 test_pylast.py +echo --- +pep8 pylast.py +echo --- +clonedigger --cpd-output pylast.py +grep "Clones detected" output.html +grep "lines are duplicates" output.html diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index c3726e8..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pyyaml diff --git a/test_requirements.txt b/test_requirements.txt new file mode 100644 index 0000000..2517b20 --- /dev/null +++ b/test_requirements.txt @@ -0,0 +1,5 @@ +clonedigger +coverage +pep8 +pyyaml +pyflakes