Skip to content

Instantly share code, notes, and snippets.

@peplin
Created May 13, 2015 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peplin/c36699d8e3a1ac418f51 to your computer and use it in GitHub Desktop.
Save peplin/c36699d8e3a1ac418f51 to your computer and use it in GitHub Desktop.
A nose2 plugin to render the name of tests as something you can copy and paste and provide to nose at the command line to run an individual test
from nose2.events import Plugin
class AddressableTestNameOutcome(Plugin):
"""Render name of each test in results as as something you can copy and
paste and provide directly to nose2 at the command line to run a single
test.
"""
configSection = 'addressable_test_name'
def describeTest(self, event):
cls = event.test.__class__
event.description = "%s.%s.%s" % (
cls.__module__, cls.__name__, event.test._testMethodName)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment