Changeset 4336
- Timestamp:
- Mar 29, 2007, 11:35:19 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/caching/test_caching.py
r4333 r4336 394 394 self.value = value 395 395 396 # Make sure that class has been redefined to another address 397 #print 398 #print 'Initial_addr ', initial_addr 399 #print 'Redefined addr', `Dummy_memorytest` 400 msg = 'Redefined class ended up at same memory location as ' 401 msg += 'original class making this test irrelevant. Try to run ' 402 msg += 'it again and see if this error goes away.' 403 msg += 'If it persists contact Ole.Nielsen@ga.gov.au' 404 assert initial_addr != `Dummy_memorytest`, msg 405 406 396 407 retrieve_cache(Dummy_memorytest, verbose=verbose) 397 408 398 409 410 # Define class Dummy_memorytest before any tests are run 411 # to make sure it has a different memory address 412 # to the one defined in test 'test_objects_are_created_memory' 413 class Dummy_memorytest: 414 def __init__(self, value, another): 415 self.value = value 416 417 # Cache created for use with 'test_objects_are_created_memory' 418 initial_addr = `Dummy_memorytest` 419 clear_and_create_cache(Dummy_memorytest, verbose=False) 420 421 422 399 423 400 424 … … 405 429 #------------------------------------------------------------- 406 430 if __name__ == "__main__": 407 408 # Cache created for test_objects_are_created_memory to make sure it has a different memory address409 clear_and_create_cache(Dummy_memorytest, verbose=False)410 411 431 suite = unittest.makeSuite(Test_Caching,'test') 412 432 runner = unittest.TextTestRunner()
Note: See TracChangeset
for help on using the changeset viewer.