From 48740c6c07bcb97f01335e0ad2247793a99d18d2 Mon Sep 17 00:00:00 2001 From: Ilya Kulakov Date: Mon, 13 Aug 2018 20:44:22 -0700 Subject: [PATCH] Run pycodestyle with pytest. --- Makefile | 1 - test_git_archive_all.py | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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)."