Changeset 441


Ignore:
Timestamp:
21-05-11 13:22:04 (2 years ago)
Author:
thomas
Message:
  • morituri/common/checksum.py: Actually raise the exception.
  • morituri/common/task.py: Document interface more clearly.
  • morituri/test/test_common_checksum.py: Use tcommon for test.common
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r440 r441  
     12011-05-21  Thomas Vander Stichele  <thomas at apestaart dot org> 
     2 
     3        * morituri/common/checksum.py: 
     4          Actually raise the exception. 
     5        * morituri/common/task.py: 
     6          Document interface more clearly. 
     7        * morituri/test/test_common_checksum.py: 
     8          Use tcommon for test.common 
     9 
    1102011-05-19  Thomas Vander Stichele  <thomas at apestaart dot org> 
    211 
  • trunk/morituri/common/checksum.py

    r426 r441  
    7575        if not self.exception: 
    7676            self.paused() 
     77        else: 
     78            raise self.exception 
    7779 
    7880    def getPipelineDesc(self): 
  • trunk/morituri/common/task.py

    r437 r441  
    7474 
    7575        Subclasses should chain up to me at the beginning. 
     76 
     77        Subclass implementations should raise exceptions immediately in 
     78        case of failure (using set(AndRaise)Exception) first, or do it later 
     79        using those methods. 
     80 
     81        If start doesn't raise an exception, the task should run until 
     82        complete, or setException and stop(). 
    7683        """ 
    7784        self.debug('starting') 
  • trunk/morituri/test/test_common_checksum.py

    r426 r441  
    1212from morituri.test import common 
    1313 
    14 from morituri.common import task, checksum, log 
     14from morituri.common import task, checksum, log, common 
     15from morituri.image import image 
    1516 
    16 from morituri.test import common 
     17from morituri.test import common as tcommon 
    1718 
    1819def h(i): 
    1920    return "0x%08x" % i 
    2021 
    21 class EmptyTestCase(common.TestCase): 
     22class EmptyTestCase(tcommon.TestCase): 
    2223    def testEmpty(self): 
    2324        # this test makes sure that checksumming empty files doesn't hang 
     
    3132        os.unlink(path) 
    3233 
    33 class PathTestCase(common.TestCase): 
     34class PathTestCase(tcommon.TestCase): 
    3435    def _testSuffix(self, suffix): 
    3536        self.runner = task.SyncRunner(verbose=False) 
     
    4142        os.unlink(path) 
    4243 
    43 class UnicodePathTestCase(PathTestCase, common.UnicodeTestMixin): 
     44class UnicodePathTestCase(PathTestCase, tcommon.UnicodeTestMixin): 
    4445    def testUnicodePath(self): 
    4546        # this test makes sure we can checksum a unicode path 
Note: See TracChangeset for help on using the changeset viewer.