<commit_before>================
Nose Progressive
================

Nose Progressive is a nose_ plugin which displays progress in a stationary
progress bar, freeing the rest of the screen (as well as the scrollback buffer)
for the compact display of test failures. It displays failures and errors as
soon as they occur and avoids scrolling them off the screen in favor of less
useful output.

.. _nose: http://somethingaboutorange.com/mrl/projects/nose/

The governing philosophy of Nose Progressive is to get useful information onto
the screen as soon as possible and keep it there as long as possible while
still indicating progress.

Features
========

* Indicate progress in a stationary progress bar rather than scrolling useful
  tracebacks off the screen or spacing them out with dots and cruft.
* Show tracebacks as soon as they occur rather than waiting until the bitter
  end. Strip the "Traceback (most recent call last):" off tracebacks so they
  take less space.
* Identify failed tests in a format that can be fed back to nose, so it's easy
  to re-run them.
* Print a filesystem path complete with vi-style line number, so you can paste
  it to the commandline and be taken straight to the bug in your editor.
* Work great with Django via django-nose_ (of course).

.. _django-nose: https://github.com/jbalogh/django-nose

Installation
============

::

  pip install nose-progressive

Or, to get the bleeding-edge, unreleased version::

  pip install -e \
    git://github.com/erikrose/nose-progressive.git#egg=nose-progressive

Use
===

::

  nosetests --with-progressive

Example
=======

The following doesn't quite do it justice; in an actual terminal, the 2
pathname lines after FAIL or ERROR are **bold** to aid visual chunking, and the
progress bar at the bottom is bold as well::

  % nosetests --with-progressive
  
  FAIL: kitsune.apps.notifications.tests.test_events:MailTests.test_anonymous
        apps/notifications/tests/test_events.py +31
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 279, in run
      testMethod()
    File "/Users/erose/Checkouts/kitsune/../kitsune/apps/notifications/tests/test_events.py", line 361, in test_anonymous
      eq_(1, len(mail.outbox))
    File "/Users/erose/Checkouts/kitsune/vendor/packages/nose/nose/tools.py", line 31, in eq_
      assert a == b, msg or "%r != %r" % (a, b)
  AssertionError

  ERROR: kitsune.apps.questions.tests.test_templates:TemplateTestCase.test_woo
         apps/questions/tests/test_templates.py +494
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 279, in run
      testMethod()
    File "/Users/erose/Checkouts/kitsune/vendor/packages/mock/mock.py", line 196, in patched
      return func(*args, **keywargs)
    File "/Users/erose/Checkouts/kitsune/../kitsune/apps/questions/tests/test_templates.py", line 494, in test_woo
      attrs_eq(mail.outbox[0], to=['<EMAIL>'],
  IndexError: list index out of range

  kitsune.apps.questions.tests.test_templates:TaggingViewTestsAsAdmin.test_add_new_canonicalizes         [===========-  ]

Caveats and known bugs
======================

* Skipped tests get counted in Python 2.6, but they don't get printed. I<commit_msg>Flip line number in README. I really need to make this into something like a doctest.<commit_after>================
Nose Progressive
================

Nose Progressive is a nose_ plugin which displays progress in a stationary
progress bar, freeing the rest of the screen (as well as the scrollback buffer)
for the compact display of test failures. It displays failures and errors as
soon as they occur and avoids scrolling them off the screen in favor of less
useful output.

.. _nose: http://somethingaboutorange.com/mrl/projects/nose/

The governing philosophy of Nose Progressive is to get useful information onto
the screen as soon as possible and keep it there as long as possible while
still indicating progress.

Features
========

* Indicate progress in a stationary progress bar rather than scrolling useful
  tracebacks off the screen or spacing them out with dots and cruft.
* Show tracebacks as soon as they occur rather than waiting until the bitter
  end. Strip the "Traceback (most recent call last):" off tracebacks so they
  take less space.
* Identify failed tests in a format that can be fed back to nose, so it's easy
  to re-run them.
* Print a filesystem path complete with vi-style line number, so you can paste
  it to the commandline and be taken straight to the bug in your editor.
* Work great with Django via django-nose_ (of course).

.. _django-nose: https://github.com/jbalogh/django-nose

Installation
============

::

  pip install nose-progressive

Or, to get the bleeding-edge, unreleased version::

  pip install -e \
    git://github.com/erikrose/nose-progressive.git#egg=nose-progressive

Use
===

::

  nosetests --with-progressive

Example
=======

The following doesn't quite do it justice; in an actual terminal, the 2
pathname lines after FAIL or ERROR are **bold** to aid visual chunking, and the
progress bar at the bottom is bold as well::

  % nosetests --with-progressive
  
  FAIL: kitsune.apps.notifications.tests.test_events:MailTests.test_anonymous
        +31 apps/notifications/tests/test_events.py
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 279, in run
      testMethod()
    File "/Users/erose/Checkouts/kitsune/../kitsune/apps/notifications/tests/test_events.py", line 361, in test_anonymous
      eq_(1, len(mail.outbox))
    File "/Users/erose/Checkouts/kitsune/vendor/packages/nose/nose/tools.py", line 31, in eq_
      assert a == b, msg or "%r != %r" % (a, b)
  AssertionError

  ERROR: kitsune.apps.questions.tests.test_templates:TemplateTestCase.test_woo
         +494 apps/questions/tests/test_templates.py
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 279, in run
      testMethod()
    File "/Users/erose/Checkouts/kitsune/vendor/packages/mock/mock.py", line 196, in patched
      return func(*args, **keywargs)
    File "/Users/erose/Checkouts/kitsune/../kitsune/apps/questions/tests/test_templates.py", line 494, in test_woo
      attrs_eq(mail.outbox[0], to=['<EMAIL>'],
  IndexError: list index out of range

  kitsune.apps.questions.tests.test_templates:TaggingViewTestsAsAdmin.test_add_new_canonicalizes         [===========-  ]

Caveats and known bugs
======================

* Skipped tests get counted in Python 2.6, but they don't get printed. I
{'fraction_non_alphanumeric': 0.11168280871670702, 'fraction_numerical': 0.01059322033898305, 'mean_word_length': 3.969172932330827, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1134966', 'n_tokens_mistral': 2059, 'n_tokens_neox': 1911, 'n_words': 700}