Changeset 48

Show
Ignore:
Timestamp:
Tue May 23 21:19:39 2006
Author:
jpellerin
Message:

r1346@Jason-Pellerins-Computer: jhp | 2006-05-23 21:19:25 -0500
Fix naming of funcs wrapped with raises() or timed()

Files:

Legend:

Unmodified
Added
Removed
Modified
  • branches/0.9-stable/unit_tests/test_tools.py

    r40 r48  
    30 30  
    31 31     def test_raises(self):  
    32    
      32         from nose.case import FunctionTestCase  
      33          
    33 34         def raise_typeerror():  
    34 35             raise TypeError("foo")  
     
    40 41         raise_other = raises(ValueError)(raise_typeerror)  
    41 42         no_raise = raises(TypeError)(noraise)  
      43  
      44         tc = FunctionTestCase(raise_good)  
      45         self.assertEqual(str(tc), "%s.%s" % (__name__, 'raise_typeerror'))  
    42 46          
    43 47         raise_good()  
  • branches/0.9-stable/nose/tools.py

    r40 r48  
    49 49         try:  
    50 50             newfunc.__doc__ = func.__doc__  
      51             newfunc.__module__ = func.__module__  
    51 52             newfunc.__name__ = name  
    52 53         except TypeError:  
     
    72 73         try:  
    73 74             newfunc.__doc__ = func.__doc__  
      75             newfunc.__module__ = func.__module__             
    74 76             newfunc.__name__ = func.__name__  
    75 77         except TypeError: