File: test_pygame.py

package info (click to toggle)
gameclock 5.0
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 272 kB
  • ctags: 289
  • sloc: python: 1,551; makefile: 9
file content (28 lines) | stat: -rwxr-xr-x 669 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
#!/usr/bin/python

import unittest
import pygame
import sys

class MixerTest(unittest.TestCase):

    def setUp(self):
        pygame.init()
        #import pdb; pdb.set_trace()
        pygame.mixer.init()
        pass

    def test_stop(self):
        """this should not hang, but it does!"""
        with self.assertRaises(SystemExit):
            sys.exit()

    def test_something_else(self):
        """dumb entry just so the unit tests continue to demonstrate the above bug"""
        self.test_list_threads()

    def test_list_threads(self):
        """debug: list threads"""
        import threading
        for t in threading.enumerate():
            print t