# Tests for Pmw color handling.
defaultPalette
= Pmw
.Color
.getdefaultpalette(Test
.root
)
colors
= ('red', 'orange', 'yellow', 'green', 'blue', 'purple', 'white')
normalcolors
= map(Pmw
.Color
.changebrightness
,
(Test
.root
,) * len(colors
), colors
, (0.85,) * len(colors
))
(Pmw
.Color
.setscheme
, (Test
.root
, normalcolors
[0]), {'foreground' : 'white'}),
testData
= testData
+ ((c
, ((tests
, kw
),)),)
for color
in normalcolors
[1:]:
testData
= testData
+ ((c
, ((tests
, kw
),)),)
(Pmw
.Color
.setscheme
, (Test
.root
, color
), {'foreground' : 'red'}),
testData
= testData
+ ((c
, ((tests
, kw
),)),)
# Restore the default colors.
(Pmw
.Color
.setscheme
, (Test
.root
,), defaultPalette
),
testData
= testData
+ ((c
, ((tests
, kw
),)),)
if __name__
== '__main__':