Back to index

python-biopython  1.60
Public Member Functions
test_GenomeDiagram.ColorsTest Class Reference

List of all members.

Public Member Functions

def test_color_conversions

Detailed Description

Definition at line 194 of file test_GenomeDiagram.py.


Member Function Documentation

Test color translations.

Definition at line 195 of file test_GenomeDiagram.py.

00195 
00196     def test_color_conversions(self):
00197         """Test color translations.
00198         """
00199         translator = ColorTranslator()
00200         
00201         # Does the translate method correctly convert the passed argument?
00202         assert translator.float1_color((0.5, 0.5, 0.5)) == translator.translate((0.5, 0.5, 0.5)), \
00203             "Did not correctly translate colour from floating point RGB tuple"
00204         assert translator.int255_color((1, 75, 240)) == translator.translate((1, 75, 240)), \
00205             "Did not correctly translate colour from integer RGB tuple"
00206         assert translator.artemis_color(7) == translator.translate(7), \
00207             "Did not correctly translate colour from Artemis colour scheme"                        
00208         assert translator.scheme_color(2) == translator.translate(2), \
00209             "Did not correctly translate colour from user-defined colour scheme"
00210 
            

The documentation for this class was generated from the following file: