5 class TestResolutions(unittest.TestCase):
8 # check whether a few aspect ratios are printed as expected
9 self.assertEqual(str(screen.Resolution(1024, 768)), '1024x768 (4:3)')
10 self.assertTrue(str(screen.Resolution(1280, 1024)) in ('1280x1024 (5:4)', '1280x1024 (4:3)'))
11 self.assertEqual(str(screen.Resolution(1366, 768)), '1366x768 (16:9)')
12 self.assertEqual(str(screen.Resolution(1920, 1080)), '1920x1080 (16:9)')
13 self.assertEqual(str(screen.Resolution(1920, 1200)), '1920x1200 (16:10)')
14 self.assertEqual(str(screen.Resolution(720, 480)), '720x480 (3:2)')
16 if __name__ == '__main__':