~jbaker/storm/nose_plugin

« back to all changes in this revision

Viewing changes to tests/info.py

  • Committer: Gustavo Niemeyer
  • Date: 2008-01-08 16:48:55 UTC
  • Revision ID: gustavo@niemeyer.net-20080108164855-c9vd6ls065jn14r8
Fixing cache issue by correcting ObjectInfo.__eq__, with a set
of nice tests for that. [r=michelp,bigkevmcd,radix]

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
        self.variable1 = self.obj_info.variables[Class.prop1]
184
184
        self.variable2 = self.obj_info.variables[Class.prop2]
185
185
 
 
186
    def test_hashing(self):
 
187
        self.assertEquals(hash(self.obj_info), hash(self.obj_info))
 
188
 
 
189
    def test_equals(self):
 
190
        obj_info1 = self.obj_info
 
191
        obj_info2 = get_obj_info(self.Class())
 
192
        self.assertFalse(obj_info1 == obj_info2)
 
193
 
 
194
    def test_not_equals(self):
 
195
        obj_info1 = self.obj_info
 
196
        obj_info2 = get_obj_info(self.Class())
 
197
        self.assertTrue(obj_info1 != obj_info2)
186
198
 
187
199
    def test_dict_subclass(self):
188
200
        self.assertTrue(isinstance(self.obj_info, dict))