mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-09-05 17:30:26 +02:00
29 lines
924 B
Python
29 lines
924 B
Python
import unittest
|
|
from unittests import wtc
|
|
import wx
|
|
import wx.lib.colourdb
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class lib_colourdb_Tests(wtc.WidgetTestCase):
|
|
|
|
def test_lib_colourdb1(self):
|
|
pnl = wx.Panel(self.frame)
|
|
|
|
wx.lib.colourdb.updateColourDB()
|
|
|
|
self.assertTrue(wx.TheColourDatabase.Find('NAVY').IsOk())
|
|
self.assertTrue(wx.TheColourDatabase.Find('GREY93').IsOk())
|
|
self.assertTrue(wx.TheColourDatabase.Find('MEDIUMPURPLE1').IsOk())
|
|
|
|
self.assertEqual(wx.TheColourDatabase.Find('ORANGERED1'),
|
|
wx.Colour(255, 69, 0, 255))
|
|
|
|
self.assertIn(wx.TheColourDatabase.FindName(wx.Colour(255, 69, 0)),
|
|
['ORANGE RED', 'ORANGERED'])
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|