mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-09-05 17:30:26 +02:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
62 lines
1.3 KiB
Python
62 lines
1.3 KiB
Python
import imp_unittest
|
|
import wtc
|
|
import wx
|
|
|
|
# NOTE: The wx.DC tests are done in the test modules for the various DC types
|
|
# that inherit from wx.DC. The stuff tested here are just the other items
|
|
# generated from etg/dc.py
|
|
|
|
# TODO: It may make sense to make a mixin class here that does test various
|
|
# aspects and drawing APIs of a DC, and then have the other DC test cases mix
|
|
# with it and call its methods.
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class DCTests(wtc.WidgetTestCase):
|
|
|
|
def test_ConstantsExist(self):
|
|
wx.CLEAR
|
|
wx.XOR
|
|
wx.INVERT
|
|
wx.OR_REVERSE
|
|
wx.AND_REVERSE
|
|
wx.COPY
|
|
wx.AND
|
|
wx.AND_INVERT
|
|
wx.NO_OP
|
|
wx.NOR
|
|
wx.EQUIV
|
|
wx.SRC_INVERT
|
|
wx.OR_INVERT
|
|
wx.NAND
|
|
wx.OR
|
|
wx.SET
|
|
|
|
wx.FLOOD_SURFACE
|
|
wx.FLOOD_BORDER
|
|
|
|
wx.MM_TEXT
|
|
wx.MM_METRIC
|
|
wx.MM_LOMETRIC
|
|
wx.MM_TWIPS
|
|
wx.MM_POINTS
|
|
|
|
|
|
|
|
def test_FontMetrics(self):
|
|
fm = wx.FontMetrics()
|
|
fm.height
|
|
fm.ascent
|
|
fm.descent
|
|
fm.internalLeading
|
|
fm.externalLeading
|
|
fm.averageWidth
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|