Show
Ignore:
Timestamp:
12/25/06 18:25:30 (5 years ago)
Author:
mg
Message:

Ability to customize keyboard controls.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/pyspacewar/tests/test_ui.py

    r76 r224  
    217217 
    218218 
     219def setUp(test=None): 
     220    import pygame 
     221    pygame.init() # so that pygame.key.name() works 
     222    # unfortunately, on linux, if $DISPLAY is unset, pygame.init doesn't 
     223    # complain, but pygame.key.name() returns 'unknown key' for all keys 
     224 
     225 
    219226def test_suite(): 
    220227    path = os.path.join(os.path.dirname(__file__), os.path.pardir) 
     
    222229        sys.path.append(path) 
    223230    return unittest.TestSuite([ 
    224                         doctest.DocTestSuite('ui'), 
     231                        doctest.DocTestSuite('ui', setUp=setUp), 
    225232                        doctest.DocTestSuite()]) 
    226233