Marcus von Appen avatar Marcus von Appen committed 390d83d

- slightly improved IronPython support within the unit tests.

Comments (0)

Files changed (17)

 @IF "%PYPY19%" == "" SET PYPY19=c:\pypy-1.9\pypy.exe
 @IF "%PYPY20%" == "" SET PYPY20=c:\pypy-2.0\pypy.exe
 @IF "%PYPY21%" == "" SET PYPY21=c:\pypy-2.1\pypy.exe
-@IF "%IRONPYTHON27_X86%" == "" SET IRONPYTHON27_X86=c:\IronPython-2.7.3\ipy.exe
-@IF "%IRONPYTHON27_X64%" == "" SET IRONPYTHON27_X64=c:\IronPython-2.7.3\ipy64.exe
+@IF "%IRONPYTHON27_X86%" == "" SET IRONPYTHON27_X86=c:\IronPython-2.7.4\ipy.exe
+@IF "%IRONPYTHON27_X64%" == "" SET IRONPYTHON27_X64=c:\IronPython-2.7.4\ipy64.exe
 
 @SET INTERP_X64=%PYTHON27_X64%;%PYTHON32_X64%;%PYTHON33_X64%;%IRONPYTHON27_X64%
 @SET INTERP_X86=%PYTHON27_X86%;%PYTHON32_X86%;%PYTHON33_X86%;%PYPY18%;^

sdl2/test/audio_test.py

         # self.assertRaises(SDLError, audio.SDL_GetAudioDriver, -1)
         # self.assertRaises(SDLError, audio.get_audio_driver,
         #                  drivercount + 1)
-        self.assertRaises(ctypes.ArgumentError, audio.SDL_GetAudioDriver,
-                          "Test")
-        self.assertRaises(ctypes.ArgumentError, audio.SDL_GetAudioDriver, None)
+        self.assertRaises((ctypes.ArgumentError, TypeError),
+                          audio.SDL_GetAudioDriver, "Test")
+        self.assertRaises((ctypes.ArgumentError, TypeError),
+                          audio.SDL_GetAudioDriver, None)
 
     def test_SDL_GetCurrentAudioDriver(self):
         success = 0

sdl2/test/clipboard_test.py

         SDL_Init(SDL_INIT_EVERYTHING)
 
     def tearDown(self):
-        SDL_InitSubSystem(SDL_INIT_EVERYTHING)
         SDL_Quit()
 
     @unittest.skipIf(not is_win_or_mac(), "we would need a SDL window")
         retval = clipboard.SDL_GetClipboardText()
         self.assertEqual(retval, b"Test content")
 
-        self.assertEquals(clipboard.SDL_SetClipboardText(b""), 0)
-        retval = clipboard.SDL_GetClipboardText()
-        self.assertEqual(retval, b"")
+        if sys.platform != "cli":
+            # TODO: Check next IronPython version (>2.7.4)
+            self.assertEquals(clipboard.SDL_SetClipboardText(b""), 0)
+            retval = clipboard.SDL_GetClipboardText()
+            self.assertEqual(retval, b"")
 
         self.assertEquals(clipboard.SDL_SetClipboardText(b"Test content"), 0)
         retval = clipboard.SDL_GetClipboardText()

sdl2/test/hints_test.py

         self.assertEqual(hints.SDL_GetHint(b"TEST"), b"32")
         self.assertEqual(hints.SDL_SetHint(b"TEST", b"abcdef"), 1)
         self.assertEqual(hints.SDL_GetHint(b"TEST"), b"abcdef")
-        self.assertEqual(hints.SDL_SetHint(b"", b""), 1)
-        self.assertEqual(hints.SDL_GetHint(b""), b"")
+        if sys.platform != "cli":
+            # TODO: Check on next IronPython version (>2.7.4)
+            self.assertEqual(hints.SDL_SetHint(b"", b""), 1)
+            self.assertEqual(hints.SDL_GetHint(b""), b"")
 
     def test_SDL_SetHintWithPriority(self):
         self.assertEqual(hints.SDL_SetHintWithPriority
         self.assertEqual(hints.SDL_SetHintWithPriority
                          (b"TEST", b"abcdef", hints.SDL_HINT_NORMAL), 1)
         self.assertEqual(hints.SDL_GetHint(b"TEST"), b"abcdef")
-        self.assertEqual(hints.SDL_SetHintWithPriority
-                         (b"", b"", hints.SDL_HINT_OVERRIDE), 1)
-        self.assertEqual(hints.SDL_GetHint(b""), b"")
+        if sys.platform != "cli":
+            # TODO: Check on next IronPython version (>2.7.4)
+            self.assertEqual(hints.SDL_SetHintWithPriority
+                             (b"", b"", hints.SDL_HINT_OVERRIDE), 1)
+            self.assertEqual(hints.SDL_GetHint(b""), b"")
 
 
         # self.assertRaises(ValueError, hints.SDL_SetHintWithPriority,

sdl2/test/keyboard_test.py

         window = keyboard.SDL_GetKeyboardFocus()
         # TODO: x
         # self.assertEqual(window, None)
-        rwin = video.SDL_CreateWindow(b"", 10, 10, 10, 10, 0)
+        rwin = video.SDL_CreateWindow(b"test", 10, 10, 10, 10, 0)
         window = keyboard.SDL_GetKeyboardFocus()
         if window:
             self.assertEqual(video.SDL_GetWindowID(window),
         # self.assertRaises(ValueError, keyboard.get_scancode_from_key, "Test")
         # self.assertRaises(TypeError, keyboard.get_scancode_from_key, self)
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't pass empty bytes() to ctypes")
     def test_SDL_GetScancodeFromName(self):
         codes = range(scancode.SDL_SCANCODE_A, scancode.SDL_SCANCODE_Z)
         xoff = 0

sdl2/test/log_test.py

 import ctypes
 from .. import log
 
-_ISIPY = sys.platform == "cli"
-
-
-@unittest.skipIf(_ISIPY, "IronPython does not handle exceptions correctly")
+@unittest.skipIf(sys.platform == "cli",
+                 "IronPython does not handle func pointers correctly")
 class SDLLogTest(unittest.TestCase):
     __tags__ = ["sdl"]
 

sdl2/test/pixels_test.py

         self.assertEqual(pixels.SDL_GetPixelFormatName(99999),
                          b"SDL_PIXELFORMAT_UNKNOWN")
 
-    @unittest.skipIf(sys.platform == "cli",
-                     "IronPython's ctypes can't handle long values correctly")
     def test_SDL_MasksToPixelFormatEnum(self):
         if sys.byteorder == "little":
             val = pixels.SDL_MasksToPixelFormatEnum(32,
         #                   pixels.SDL_PIXELFORMAT_YUY2)
 
     def test_SDL_AllocFreePalette(self):
-        self.assertRaises(ArgumentError, pixels.SDL_AllocPalette, None)
-        self.assertRaises(ArgumentError, pixels.SDL_AllocPalette,
+        self.assertRaises((ArgumentError, TypeError), pixels.SDL_AllocPalette,
+                          None)
+        self.assertRaises((ArgumentError, TypeError), pixels.SDL_AllocPalette,
                           "Test")
         # self.assertRaises(ValueError, pixels.SDL_AllocPalette, -5)
 

sdl2/test/rect_test.py

         self.assertFalse(ret)
         # TODO
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython does not convert arrays to POINTER objects")
     def test_SDL_EnclosePoints(self):
         pt1 = rect.SDL_Point(0, 0)
         pt2 = rect.SDL_Point(5, 7)

sdl2/test/render_test.py

 
     @unittest.skipIf(hasattr(sys, "pypy_version_info"),
                      "PyPy's ctypes can't do byref(value, offset)")
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't cast values array values correctly")
     def test_SDL_RenderDrawPoint(self):
         points = ((-4, -3), (-4, 3), (4, -3),
                   (0, 0), (1, 1), (10, 10), (99, 99),

sdl2/test/sdl2ext_draw_test.py

 
     @unittest.skipIf(hasattr(sys, "pypy_version_info"),
                      "PyPy's ctypes can't do byref(value, offset)")
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't cast correctly")
     def test_fill(self):
         # TODO: add exceptions and more bounding tests.
         rects = ((0, 0, 3, 2),
                     else:
                         self.assertEqual(col, 0, "color mismatch at (x, y)")
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython does not convert int values correctly")
     def test_prepare_color(self):
         rcolors = (Color(0, 0, 0, 0),
                    Color(255, 255, 255, 255),

sdl2/test/sdl2ext_pixelaccess_test.py

 
     @unittest.skipIf(hasattr(sys, "pypy_version_info"),
                      "PyPy's ctypes can't do byref(value, offset)")
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't cast correctly")
     def test_PixelView(self):
         factory = sdl2ext.SpriteFactory(sdl2ext.SOFTWARE)
         sprite = factory.create_sprite(size=(10, 10), bpp=32)

sdl2/test/sdl2ext_resources_test.py

         urlpath = "file:%s" % p2url(tfile)
         self.assertRaises(urllib2.URLError, resources.open_url, urlpath)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython's tarfile module is broken")
     def test_Resources(self):
         self.assertRaises(ValueError, resources.Resources, "invalid")
 
         self.assertIsNotNone(res3.get("rwopstest.txt"))
         self.assertIsNotNone(res3.get("surfacetest.bmp"))
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython's tarfile module is broken")
     def test_Resources_add(self):
         fpath = os.path.join(os.path.dirname(__file__), "resources")
         sfile = os.path.join(fpath, "surfacetest.bmp")
         self.assertIsNotNone(res.get("rwopstest.txt"))
         self.assertRaises(KeyError, res.get, "resources.tar.gz")
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython's tarfile module is broken")
     def test_Resources_get(self):
         fpath = os.path.join(os.path.dirname(__file__), "resources")
 
                 self.assertIsNotNone(res.get("surfacetest.bmp"))
                 self.assertIsNotNone(res.get("rwopstest.txt"))
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython's tarfile module is broken")
     def test_Resources_get_filelike(self):
         fpath = os.path.join(os.path.dirname(__file__), "resources")
         zfile = os.path.join(fpath, "resources.zip")
         self.assertRaises(KeyError, res.get_filelike, "invalid")
         self.assertRaises(KeyError, res.get_filelike, 1234)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython's tarfile module is broken")
     def test_Resources_get_path(self):
         fpath = os.path.join(os.path.dirname(__file__), "resources")
         zfile = os.path.join(fpath, "resources.zip")
         self.assertRaises(KeyError, res.get_path, "invalid")
         self.assertRaises(KeyError, res.get_path, 1234)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython's tarfile module is broken")
     def test_Resources_scan(self):
         fpath = os.path.join(os.path.dirname(__file__))
         res = resources.Resources()

sdl2/test/sdlimage_test.py

             self.assertIsInstance(sf.contents, surface.SDL_Surface)
             surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_Load_RW(self):
         fname = "surfacetest.%s"
         for fmt in formats:
         render.SDL_DestroyRenderer(rd)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadTexture_RW(self):
         sf = surface.SDL_CreateRGBSurface(0, 10, 10, 32, 0, 0, 0, 0)
         rd = render.SDL_CreateSoftwareRenderer(sf)
         render.SDL_DestroyRenderer(rd)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadTextureTyped_RW(self):
         sf = surface.SDL_CreateRGBSurface(0, 10, 10, 32, 0, 0, 0, 0)
         rd = render.SDL_CreateSoftwareRenderer(sf)
         render.SDL_DestroyRenderer(rd)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadTyped_RW(self):
         fname = "surfacetest.%s"
         for fmt in formats:
             self.assertIsInstance(sf.contents, surface.SDL_Surface)
             surface.SDL_FreeSurface(sf)
 
-    def test_IMG_LoadBMP_rw(self):
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
+    def test_IMG_LoadBMP_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.bmp"), "rb")
         sf = sdlimage.IMG_LoadBMP_RW(rwops.rw_from_object(fp))
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadCUR_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.cur"), "rb")
         surface.SDL_FreeSurface(sf)
         pass
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadGIF_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.gif"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadICO_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.ico"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadJPG_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.jpg"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadLBM_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.lbm"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadPCX_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.pcx"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadPNG_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.png"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadPNM_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.pnm"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadTGA_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.tga"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadTIF_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.tif"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadWEBP_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.webp"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadXCF_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.xcf"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_LoadXPM_RW(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.xpm"), "rb")
         self.assertIsInstance(sf.contents, surface.SDL_Surface)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isBMP(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isBMP(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isCUR(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isCUR(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isGIF(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isGIF(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isICO(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isICO(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isJPG(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isJPG(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isLBM(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isLBM(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isPCX(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isPCX(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isPNG(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isPNG(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isPNM(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isPNM(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isTIF(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isTIF(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isWEBP(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isWEBP(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isXCF(self):
         fname = "surfacetest.%s"
         for fmt in formats:
                 self.assertFalse(sdlimage.IMG_isXCF(imgrw))
             fp.close()
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't handle RW objects")
     def test_IMG_isXPM(self):
         fname = "surfacetest.%s"
         for fmt in formats:
 
     @unittest.skipIf(hasattr(sys, "pypy_version_info"),
                      "PyPy's ctypes fails to pass a correct string array")
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't handle byte() objects")
     def test_IMG_ReadXPMFromArray(self):
         fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "resources", "surfacetest.xpm"), "rb")

sdl2/test/sdlttf_test.py

         #self.assertRaises(ValueError, sdlttf.open_font_index, filename, 10,-2)
         #self.assertRaises(sdl.SDLError, sdlttf.open_font_index, "test", 10, 0)
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't handle RW objects")
     def test_TTF_OpenFontRW(self):
         fp = open(fontfile, "rb")
         fontrw = rwops.rw_from_object(fp)
         #                  sdlttf.open_font_rw, None, False, 10)
         #self.assertRaises(TypeError, sdlttf.open_font_rw, fontrw, False, None)
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't handle RW objects")
     def test_TTF_OpenFontIndexRW(self):
         fp = open(fontfile, "rb")
         fontrw = rwops.rw_from_object(fp)

sdl2/test/shape_test.py

             self.assertFalse(val)
             video.SDL_DestroyWindow(window)
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't create Union types")
     def test_SDL_SetWindowShape(self):
         sf = surface.SDL_CreateRGBSurface(0, 10, 10, 32,
                                           0xFF000000,

sdl2/test/surface_test.py

         self.assertIsInstance(sf, surface.SDL_Surface)
         # TODO: property checks
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython crashes for unknown reasons")
     def test_SDL_ConvertPixels(self):
         for buf, bpp, pitch, masks, fmt in rgba_pixelations_16x16:
             bytecount = bpp // 8
             for index, val in enumerate(dst):
                 self.assertEqual(val, src.view[index])
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython crashes for unknown reasons")
     def test_SDL_ConvertSurface(self):
         for idx in pixels.ALL_PIXELFORMATS:
             if pixels.SDL_ISPIXELFORMAT_FOURCC(idx):
         #######################################################################
         pixels.SDL_FreeFormat(pfmt)
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython crashes for unknown reasons")
     def test_SDL_ConvertSurfaceFormat(self):
         for pfmt in pixels.ALL_PIXELFORMATS:
             if pixels.SDL_ISPIXELFORMAT_FOURCC(pfmt):
                 surface.SDL_FreeSurface(sf)
                 surface.SDL_FreeSurface(csf)
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython crashes for unknown reasons")
     def test_SDL_CreateRGBSurface(self):
         for w in range(1, 100, 5):
             for h in range(1, 100, 5):
         #self.assertRaises(sdl.SDLError, surface.create_rgb_surface, 1, 1, 32,
         #                  0xf0, 0x0f, 0x01, 0x02)
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython crashes for unknown reasons")
     def test_SDL_CreateRGBSurfaceFrom(self):
         for buf, bpp, pitch, masks, fmt in rgba_pixelations_16x16:
             if bpp == 32:
                         self.assertEqual(ret, 0)
                     surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't handle array to POINTER conversions")
     def test_SDL_FillRects(self):
         rectlist = to_ctypes([rect.SDL_Rect(0, 0, 0, 0),
                               rect.SDL_Rect(0, 0, 10, 10),
                 "clip: Could not set clip rect %s" % r)
         surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't handle int type conversions")
     def test_SDL_GetSetColorKey(self):
         colorkeys = ((0, 0, 0),
                      (32, 64, 128),
                 self.assertFalse(sf.contents.locked)
             surface.SDL_FreeSurface(sf)
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't handle array to POINTER conversions")
     def test_SDL_LowerBlit(self):
         bpp = 32
         w, h = 10, 10
     def test_SDL_LowerBlitScaled(self):
         pass
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't handle array to POINTER conversions")
     def test_SDL_UpperBlit(self):
         bpp = 32
         w, h = 10, 10
             surface.SDL_FreeSurface(sf)
         surface.SDL_FreeSurface(dest)
 
+    @unittest.skipIf(sys.platform=="cli", "IronPython can't cast correctly")
     def test_SDL_BlitSurface(self):
         bpp = 32
         w, h = 10, 10
     def test_SDL_SetSurfaceRLE(self):
         pass
 
+    @unittest.skipIf(sys.platform=="cli",
+                     "IronPython can't handle RW objects")
     def test_SDL_LoadBMP_RW(self):
         fp = open(self.testfile, "rb")
         imgrw = rwops.rw_from_object(fp)

sdl2/test/video_test.py

         #self.assertRaises((AttributeError, TypeError),
         #                  video.SDL_SetWindowIcon, window, 123456)
 
-    @unittest.skipIf(sys.platform == "cli",
-                     "IronPython's ctypes fails with access violations")
     @unittest.skipIf(hasattr(sys, "pypy_version_info"),
                      "PyPy can't create proper py_object() values")
     def test_SDL_GetSetWindowData(self):
         doprint("Please check, if the window is shown again")
         video.SDL_DestroyWindow(window)
 
-    @unittest.skip("Seems not to work at the moment")
     @interactive("Did the window raise properly?")
     def test_SDL_RaiseWindow(self):
         window = video.SDL_CreateWindow(b"test_SDL_RaiseWindow",
         doprint("Please check, if the window was minimized properly")
         video.SDL_DestroyWindow(window)
 
-    @unittest.skip("seems not to work correctly at the moment")
     @interactive("Was the window maximized and restored properly?")
     def test_SDL_RestoreWindow(self):
         window = video.SDL_CreateWindow(b"test_SDL_RestoreWindow", 200, 200,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.