Skip to content

Commit

Permalink
Add transplant_class func to util (nose-devs#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpellerin committed Jan 29, 2012
1 parent b504595 commit 33656f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nose2/util.py
Expand Up @@ -192,6 +192,14 @@ def format_traceback(test, err):
return ''.join(msgLines)


def transplant_class(cls, module):
class C(cls):
pass
C.__module__ = module
C.__name__ = cls.__name__
return C


def parse_log_level(lvl):
"""Return numeric log level given a string"""
try:
Expand Down

0 comments on commit 33656f5

Please sign in to comment.