Commits

Tetsuya Morimoto committed 30d31c3

changed to use pytest instead of nose for testing

Comments (0)

Files changed (3)

+[pytest]
+pep8ignore = E302 E701

ticketref/tests/test_pep8.py

-# -*- coding: utf-8 -*-
-
-from os.path import (abspath, dirname, isdir)
-import pep8
-
-CURRENT_DIR = dirname(abspath(__file__))
-BASE_DIR = dirname(CURRENT_DIR)
-
-
-def test_pep8():
-    arglist = [
-        "--statistics",
-        "--filename=*.py",
-        "--show-source",
-        "--repeat",
-        "--ignore=E301,E302,E701",
-        #"--show-pep8",
-        #"-qq",
-        #"-v",
-        BASE_DIR,
-    ]
-
-    options, args = pep8.process_options(arglist)
-    runner = pep8.input_file
-
-    for path in args:
-        if isdir(path):
-            pep8.input_dir(path, runner=runner)
-        elif not pep8.excluded(path):
-            options.counters["files"] += 1
-            runner(path)
-
-    pep8.print_statistics()
-    errors = pep8.get_count("E")
-    warnings = pep8.get_count("W")
-    message = "pep8: %d errors / %d warnings" % (errors, warnings)
-    print message
-    assert errors + warnings == 0, message
 
 [testenv]
 deps =
-    nose
-    pep8
-commands = nosetests  --with-doctest -v . []
+    pytest
+    pytest-pep8
+commands = py.test -v --pep8 --doctest-module ticketref