diff --git a/Makefile b/Makefile index 345a077..a866e2b 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ all: @echo " test" test: - pycodestyle --config=. --max-line-length=240 git_archive_all.py python setup.py test install: diff --git a/test_git_archive_all.py b/test_git_archive_all.py index 2a406b1..7bb5c60 100644 --- a/test_git_archive_all.py +++ b/test_git_archive_all.py @@ -7,6 +7,7 @@ from subprocess import check_call from tarfile import TarFile +import pycodestyle import pytest from git_archive_all import GitArchiver @@ -249,3 +250,9 @@ def make_actual(tar_file): actual = make_actual(repo_tar) assert actual == expected + + +def test_pycodestyle(): + style = pycodestyle.StyleGuide(repeat=True, max_line_length=240) + report = style.check_files(['git_archive_all.py']) + assert report.total_errors == 0, "Found code style errors (and warnings)."