Beispiel #1
0
 def test_get_display_mode(self):
     numdisplays = video.get_num_video_displays()
     for index in range(numdisplays):
         modes = video.get_num_display_modes(index)
         for mode in range(modes):
             dmode = video.get_display_mode(index, mode)
             self.assertIsInstance(dmode, video.SDL_DisplayMode)
Beispiel #2
0
 def test_get_closest_display_mode(self):
     numdisplays = video.get_num_video_displays()
     for index in range(numdisplays):
         modes = video.get_num_display_modes(index)
         for mode in range(modes):
             dmode = video.get_display_mode(index, mode)
             self.assertIsInstance(dmode, video.SDL_DisplayMode)
             cmode = video.SDL_DisplayMode(dmode.format,
                                           dmode.w - 1, dmode.h - 1,
                                           dmode.refresh_rate)
             closest = video.get_closest_display_mode(index, cmode)
             self.assertEqual(closest, dmode)