File: sleep_test.py

package info (click to toggle)
pygame 1.9.4.post1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,412 kB
  • sloc: ansic: 54,632; python: 28,791; objc: 334; php: 92; sh: 76; makefile: 36; cpp: 25
file content (28 lines) | stat: -rw-r--r-- 793 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if __name__ == '__main__':
    import sys
    import os
    pkg_dir = (os.path.split(
                   os.path.split(
                       os.path.split(
                           os.path.abspath(__file__))[0])[0])[0])
    parent_dir, pkg_name = os.path.split(pkg_dir)
    is_pygame_pkg = (pkg_name == 'tests' and
                     os.path.split(parent_dir)[1] == 'pygame')
    if not is_pygame_pkg:
        sys.path.insert(0, parent_dir)
else:
    is_pygame_pkg = __name__.startswith('pygame.tests.')

import unittest

import time

class KeyModuleTest(unittest.TestCase):
    def test_get_focused(self):
        stop_time = time.time() + 10.0
        while time.time() < stop_time:
            time.sleep(1)
        self.assert_(True) 

if __name__ == '__main__':
    unittest.main()