Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

First commit

  • Loading branch information...
commit 6fa32ecddb7d5d83a04be27de597b292a695c276 0 parents
Leonardo Santagada authored
5 .gitignore
@@ -0,0 +1,5 @@
+*.pyc
+*.pyo
+*.egg-info
+dist
+
2  MANIFEST.in
@@ -0,0 +1,2 @@
+include *.txt
+include *.rst
23 README.rst
@@ -0,0 +1,23 @@
+pytest plugin to implement PEP712
+
+Usage
+-----
+
+install/update via::
+
+ pip install -U pytest-rage
+
+and to run tests type::
+
+ py.test
+
+if more than 7 tests fails fffffffuuuuu happens :)
+
+Notes
+-----
+
+The official repository of this plugin is at http://github.com/santagada/pytest-rage
+
+For more info on py.test see http://pytest.org
+
+Based on PEP712: http://www.revsys.com/blog/2011/oct/20/pep712-proposal-make-unittest2-more-accurate/
22 pytest_rage.py
@@ -0,0 +1,22 @@
+import pytest
+
+test_count = 0
+
+def pytest_report_teststatus(report):
+ global test_count
+ if report.passed:
+ letter = "."
+ elif report.skipped:
+ letter = "s"
+ elif report.failed:
+ test_count += 1
+ if test_count > 7:
+ letter = "U"
+ else:
+ letter = "F"
+ if report.when != "call":
+ if test_count > 7:
+ letter = "u"
+ else:
+ letter = "f"
+ return report.outcome, letter, report.outcome.upper()
29 setup.py
@@ -0,0 +1,29 @@
+import os
+from setuptools import setup
+
+# Utility function to read the README file.
+# Used for the long_description. It's nice, because now 1) we have a top level
+# README file and 2) it's easier to type in the README file than to put a raw
+# string in below ...
+def read(fname):
+ return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+setup(
+ name='pytest-rage',
+ license='MIT',
+ description='pytest plugin to implement PEP712',
+ long_description=read("README.rst"),
+ version='0.1',
+ author='Leonardo Santagada',
+ author_email='santagada@gmail.com',
+ url='http://github.com/santagada/pytest-rage/',
+ py_modules=['pytest_rage'],
+ entry_points={'pytest11': ['rage = pytest_rage']},
+ install_requires=['pytest>=2.0'],
+ classifiers=[
+ 'Development Status :: 3 - Alpha',
+ 'Topic :: Software Development :: Testing',
+ 'Intended Audience :: Developers',
+ 'Operating System :: OS Independent',
+ ]
+)
6 test_rage.py
@@ -0,0 +1,6 @@
+def test_error():
+ assert False
+
+def pytest_generate_tests(metafunc):
+ for i in range(10):
+ metafunc.addcall()
Please sign in to comment.
Something went wrong with that request. Please try again.