Changeset 2868

Show
Ignore:
Timestamp:
03/02/07 15:27:44 (2 years ago)
Author:
nate
Message:

First round of tests are in. That's about half of dColors done so far. I stopped because out of the 15 tests 11 are failing. I will fix dColors, get the tests 'green' and finish out the tests.

On the bright side, through writing the tests I discovered a bug in the code in which a color tuple with value 1-9 gets converted to a single digit hex string and not a 2 digit so converting (0,0,0) comes out as '#000'. Chalk one up for unit testing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/dColors.py

    r2497 r2868  
    11import re 
     2 
     3class HexError(Exception): pass 
     4class InvalidCharError(HexError): pass 
     5class TypeError(HexError): pass 
     6 
     7class ColorTupleError(Exception): pass 
     8class RgbValueError(ColorTupleError): pass 
     9class LengthError(ColorTupleError): pass 
     10class IntegerTypeError(ColorTupleError): pass 
    211 
    312colorDict = {"aliceblue" : (240, 248, 255),  
  • trunk/tests/unitTests/masterTestSuite.py

    r2858 r2868  
    1616suiteList = [db.suite(), biz.suite(), lib.suite(), ui.suite()] 
    1717 
     18#import any tests for the main dabo folder 
     19import Test_dColors 
     20suiteList.append(unittest.TestLoader().loadTestsFromModule(Test_dColors)) 
     21 
     22 
    1823allTiersTestSuite = unittest.TestSuite(suiteList) 
    1924unittest.TextTestRunner(verbosity=2).run(allTiersTestSuite)