Blame SOURCES/python-actdiag-drop-pep8-test.patch

af931a
# HG changeset patch
af931a
# User tk0miya <i.tkomiya@gmail.com>
af931a
# Date 1424526659 -32400
af931a
# Node ID c1f2ed5947a1e93291f5860e4e30cee098bd635d
af931a
# Parent  d7797efa44c678111dc78fb7d4791aca6118c4fd
af931a
Drop test_pep8.py (replaced by flake8)
af931a
af931a
diff --git a/src/actdiag/tests/test_pep8.py b/src/actdiag/tests/test_pep8.py
af931a
deleted file mode 100644
af931a
--- a/src/actdiag/tests/test_pep8.py
af931a
+++ /dev/null
af931a
@@ -1,53 +0,0 @@
af931a
-# -*- coding: utf-8 -*-
af931a
-
af931a
-from __future__ import print_function
af931a
-import os
af931a
-import sys
af931a
-import pep8
af931a
-
af931a
-CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
af931a
-BASE_DIR = os.path.dirname(CURRENT_DIR)
af931a
-
af931a
-
af931a
-def test_pep8():
af931a
-    arglist = [['statistics', True],
af931a
-               ['show-source', True],
af931a
-               ['repeat', True],
af931a
-               ['paths', [BASE_DIR]]]
af931a
-
af931a
-    pep8style = pep8.StyleGuide(arglist, parse_argv=False, config_file=True)
af931a
-    options = pep8style.options
af931a
-    if options.doctest:
af931a
-        import doctest
af931a
-        fail_d, done_d = doctest.testmod(report=False, verbose=options.verbose)
af931a
-        fail_s, done_s = pep8.selftest(options)
af931a
-        count_failed = fail_s + fail_d
af931a
-        if not options.quiet:
af931a
-            count_passed = done_d + done_s - count_failed
af931a
-            print("%d passed and %d failed." % (count_passed, count_failed))
af931a
-            if count_failed:
af931a
-                print("Test failed.")
af931a
-            else:
af931a
-                print("Test passed.")
af931a
-        if count_failed:
af931a
-            sys.exit(1)
af931a
-    if options.testsuite:
af931a
-        pep8.init_tests(pep8style)
af931a
-    report = pep8style.check_files()
af931a
-    if options.statistics:
af931a
-        report.print_statistics()
af931a
-    if options.benchmark:
af931a
-        report.print_benchmark()
af931a
-    if options.testsuite and not options.quiet:
af931a
-        report.print_results()
af931a
-    if report.total_errors:
af931a
-        if options.count:
af931a
-            sys.stderr.write(str(report.total_errors) + '\n')
af931a
-        # sys.exit(1)
af931a
-
af931a
-    # reporting errors (additional summary)
af931a
-    errors = report.get_count('E')
af931a
-    warnings = report.get_count('W')
af931a
-    message = 'pep8: %d errors / %d warnings' % (errors, warnings)
af931a
-    print(message)
af931a
-    assert report.total_errors == 0, message