mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 11:00:07 +01:00
* Changed imports to use either absolute or explicit relative imports. Implicit relative imports are no longer allowed. * Changes to accomodate standard library classes or modues moving to other locations, or being removed entirely. * Changes related to print becoming a function, execfile being removed, u'' no longer allowed, and other syntax related issues. * Working around C APIs that have changed or simply vanished. (PyInt, PyString, PyBytes, etc.) * Dealing with text file objects using strings vs binary file objects using bytes, auto-encoding, and etc. * Replacing the use of PyCObject with PyCapsule and dealing with an apparent bug where PyCapsule objects can't be imported from submodules within a package. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
import imp_unittest, unittest
|
|
import wtc
|
|
import wx
|
|
import wx.adv
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class joystick_Tests(wtc.WidgetTestCase):
|
|
|
|
def test_joystick1(self):
|
|
wx.JOYSTICK1
|
|
wx.JOYSTICK2
|
|
wx.JOY_BUTTON_ANY
|
|
wx.JOY_BUTTON1
|
|
wx.JOY_BUTTON2
|
|
wx.JOY_BUTTON3
|
|
wx.JOY_BUTTON4
|
|
|
|
wx.wxEVT_JOY_BUTTON_DOWN
|
|
wx.wxEVT_JOY_BUTTON_UP
|
|
wx.wxEVT_JOY_MOVE
|
|
wx.wxEVT_JOY_ZMOVE
|
|
|
|
wx.EVT_JOY_BUTTON_DOWN
|
|
wx.EVT_JOY_BUTTON_UP
|
|
wx.EVT_JOY_MOVE
|
|
wx.EVT_JOY_ZMOVE
|
|
wx.EVT_JOYSTICK_EVENTS
|
|
|
|
|
|
@unittest.expectedFailure
|
|
def test_joystick2(self):
|
|
# Creating a Joystick object should fail on Mac. Currently it isn't...
|
|
# We'll need a new feature added to sip to get it.
|
|
if 'wxMac' in wx.PlatformInfo:
|
|
with self.assertRaises(NotImplementedError):
|
|
j = wx.adv.Joystick()
|
|
else:
|
|
j = wx.adv.Joystick()
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|