init
This commit is contained in:
commit
38355d2442
9083 changed files with 1225834 additions and 0 deletions
26
.venv/lib/python3.8/site-packages/pygame/tests/video_test.py
Normal file
26
.venv/lib/python3.8/site-packages/pygame/tests/video_test.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import unittest
|
||||
import sys
|
||||
import pygame
|
||||
|
||||
from pygame._sdl2 import video
|
||||
|
||||
|
||||
class VideoModuleTest(unittest.TestCase):
|
||||
default_caption = "pygame window"
|
||||
|
||||
@unittest.skipIf(
|
||||
not (sys.maxsize > 2 ** 32),
|
||||
"32 bit SDL 2.0.16 has an issue.",
|
||||
)
|
||||
def test_renderer_set_viewport(self):
|
||||
"""works."""
|
||||
window = video.Window(title=self.default_caption, size=(800, 600))
|
||||
renderer = video.Renderer(window=window)
|
||||
renderer.logical_size = (1920, 1080)
|
||||
rect = pygame.Rect(0, 0, 1920, 1080)
|
||||
renderer.set_viewport(rect)
|
||||
self.assertEqual(renderer.get_viewport(), (0, 0, 1920, 1080))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue