Changeset 2886

Show
Ignore:
Timestamp:
03/06/07 21:34:47 (2 years ago)
Author:
nate
Message:

Deleted the SuperClass? tests. We really need to get in the habit of running these testsbefore commits. That last commit failed 3 of the tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tests/unitTests/Test_dObject.py

    r2884 r2886  
    166166    #TODO: NEED A TEST HERE FOR INITIAL CONDITION 
    167167 
    168 class TestSuperClassProperty(BaseTestdObject): 
    169     """ 
    170     Test List: 
    171         - Set dObject.SuperClass should fail with any input 
    172         - a.SuperClass should return class Dummy when a = dObject() 
    173         - a.SuperClass should return class dObject when a = someObject and someObject subclasses dObject 
    174     """ 
    175      
    176     def testSetAlwaysFails(self): 
    177         """Set dObject.SuperClass should fail with any input""" 
    178         def setSuperClass(val): 
    179             self.dObject.SuperClass = val 
    180         self.assertRaises(AttributeError, setSuperClass, 42) 
    181         self.assertRaises(AttributeError, setSuperClass, "string") 
    182         self.assertRaises(AttributeError, setSuperClass, ("tuple", 12, 23)) 
    183         self.assertRaises(AttributeError, setSuperClass, dObject) 
    184         self.assertRaises(AttributeError, setSuperClass, Dummy) 
    185      
    186     def testGetNoSubclass(self): 
    187         """a.SuperClass should return class Dummy when a = dObject()""" 
    188         self.assertEqual(Dummy, self.dObject.SuperClass) 
    189      
    190     def testGetWithSubclass(self): 
    191         """a.SuperClass should return class dObject when a = someObject and someObject subclasses dObject""" 
    192         class someObject(dObject): 
    193             pass 
    194         a = someObject() 
    195         self.assertEqual(dObject, a.SuperClass) 
    196  
    197168 
    198169#used for running this module bare without the test suite