python -m pygame.tests.__main__ fails on OSX 10.10.0

Issue #219 new
Kenn Sebesta
created an issue

Installed with brew install pygame.

Latest (v2.7.7) X11 from XQuartz.

======================================================================
FAIL: FontModuleTest.test_get_fonts
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pygame/tests/font_test.py", line 67, in test_get_fonts
    self.failUnless(name.islower(), name)
AssertionError

======================================================================
FAIL: FontTypeTest.test_set_bold
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pygame/tests/font_test.py", line 254, in test_set_bold
    self.failIf(f.get_bold())
AssertionError: None

======================================================================
FAIL: FontTypeTest.test_set_italic
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pygame/tests/font_test.py", line 266, in test_set_italic
    self.failIf(f.get_bold())
AssertionError: None

======================================================================
ERROR: SurfarrayModuleTest.test_make_surface
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pygame/tests/surfarray_test.py", line 488, in test_make_surface
    surf = pygame.surfarray.make_surface(self._make_src_array3d(dtype))
  File "/usr/local/lib/python2.7/site-packages/pygame/surfarray.py", line 243, in make_surface
    return numpysf.make_surface (array)
  File "/usr/local/lib/python2.7/site-packages/pygame/_numpysurfarray.py", line 368, in make_surface
    blit_array (surface, array)
  File "/usr/local/lib/python2.7/site-packages/pygame/_numpysurfarray.py", line 437, in blit_array
    surface.get_buffer ().write (data, 0)
IndexError: bytes to write exceed buffer size

----------------------------------------------------------------------
Ran 408 tests in 17.627s

FAILED (failures=3, errors=1)

Comments (3)

  1. Steven Wang

    Same here, with Mac OSX 10.10.1. I installed with pip3.

    loading pygame.tests.transform_test
    ...........................................................................F..............FF....................................................E...................................................................................................................................................................................................................................E...................................
    ======================================================================
    FAIL: FontModuleTest.test_get_fonts
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.10-x86_64.egg/pygame/tests/font_test.py", line 67, in test_get_fonts
        self.failUnless(name.islower(), name)
    AssertionError
    
    ======================================================================
    FAIL: FontTypeTest.test_set_bold
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.10-x86_64.egg/pygame/tests/font_test.py", line 254, in test_set_bold
        self.failIf(f.get_bold())
    AssertionError: None
    
    ======================================================================
    FAIL: FontTypeTest.test_set_italic
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.10-x86_64.egg/pygame/tests/font_test.py", line 266, in test_set_italic
        self.failIf(f.get_bold())
    AssertionError: None
    
    ======================================================================
    ERROR: MixerMusicModuleTest.test_load
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.10-x86_64.egg/pygame/tests/mixer_music_test.py", line 40, in test_load
        pygame.mixer.music.load(musfn)
    error: Unrecognized music format
    
    ======================================================================
    ERROR: SurfarrayModuleTest.test_make_surface
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.10-x86_64.egg/pygame/tests/surfarray_test.py", line 488, in test_make_surface
        surf = pygame.surfarray.make_surface(self._make_src_array3d(dtype))
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.10-x86_64.egg/pygame/surfarray.py", line 243, in make_surface
        return numpysf.make_surface (array)
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.10-x86_64.egg/pygame/_numpysurfarray.py", line 368, in make_surface
        blit_array (surface, array)
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.10-x86_64.egg/pygame/_numpysurfarray.py", line 437, in blit_array
        surface.get_buffer ().write (data, 0)
    IndexError: bytes to write exceed buffer size
    
    ----------------------------------------------------------------------
    Ran 408 tests in 31.450s
    
    FAILED (failures=3, errors=2)
    
  2. Seongjoo Lee

    Test fails on OS X 10.10

    Python Interpreter: Homebrew python 2.7 instead of Apple Python.

    Installation reports success while depedency check reports as below:

    WARNING, No "Setup" File Exists, Running "config.py"
    Using Darwin configuration...
    Hunting dependencies...
        SDL     : found 1.2.15
        Framework SDL not found
        FONT    : found
        Framework SDL_ttf not found
        IMAGE   : found
        Framework SDL_image not found
        MIXER   : found
        Framework SDL_mixer not found
        SMPEG   : found 0.4.5
        Framework smpeg not found
        Framework CoreMIDI found
        Framework QuickTime found
        PNG     : found
        JPEG    : found
        PORTMIDI: found
        FREETYPE: found 2.5.3
        AVFORMAT: not found
        SWSCALE : not found
    
    ...
    
    Successfully installed pygame-1.9.2a0
    

    Test with following command:

    $ python -m pygame.test
    
    ======================================================================
    FAIL: BaseModuleTest.test_get_error
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/lib/python2.7/site-packages/pygame/tests/base_test.py", line 569, in test_get_error
        e)
    AssertionError: CFStringGetCString error retrieving pDevice->product.
    
    ======================================================================
    FAIL: BaseModuleTest.test_set_error
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/lib/python2.7/site-packages/pygame/tests/base_test.py", line 586, in test_set_error
        e)
    AssertionError: CFStringGetCString error retrieving pDevice->product.
    
    ======================================================================
    FAIL: FontModuleTest.test_get_fonts
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/lib/python2.7/site-packages/pygame/tests/font_test.py", line 97, in test_get_fonts
        self.failUnless(name.islower(), name)
    AssertionError
    
    ======================================================================
    FAIL: FontModuleTest.test_get_fonts
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/lib/python2.7/site-packages/pygame/tests/font_test.py", line 97, in test_get_fonts
        self.failUnless(name.islower(), name)
    AssertionError
    
    ======================================================================
    ERROR: GL_ImageSave.test_image_save_works_with_opengl_surfaces
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/lib/python2.7/site-packages/pygame/tests/image__save_gl_surface_test.py", line 37, in test_image_save_works_with_opengl_surfaces
        pygame.image.save(screen, tmp_file)
    error: SavePNG: could not create png write struct
    
    
    ======================================================================
    ERROR: all_tests_for (pygame.tests.image_test.AllTestCases)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test/pygame.tests.image_test.py", line 1, in all_tests_for
    subprocess completely failed with return code of 1
    cmd:          ['/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/bin/python', '/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/lib/python2.7/site-packages/pygame/tests/test_utils/test_runner.py', 'pygame.tests.image_test', '--exclude', 'interactive,subprocess_ignore,python2_ignore', '--timings', '1']
    test_env:     {'TERM_PROGRAM_VERSION': '343.6', 'LOGNAME': 'seongjoo', 'USER': 'seongjoo', 'PATH': '/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/bin:/opt/local/bin:/opt/local/sbin:/Users/seongjoo/google-cloud-sdk/bin:/Users/seongjoo/mongodb/mongodb-osx-x86_64-2.6.0/bin:/Users/seongjoo/dart/dart-sdk/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/seongjoo/pear/bin:/opt/local/bin:/opt/local/sbin:/Users/seongjoo/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/Users/seongjoo', 'PS1': '(brewPy2venv)\\h:\\W \\u\\$ ', 'TERM_PROGRAM': 'Apple_Terminal', 'LANG': 'ko_KR.UTF-8', 'TERM': 'xterm-256color', 'Apple_PubSub_Socket_Render': '/private/tmp/com.apple.launchd.CvdMTV2mwz/Render', 'SHLVL': '1', 'SECURITYSESSIONID': '186a5', 'XPC_FLAGS': '0x0', '_': '/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/bin/python', 'TERM_SESSION_ID': '32DF03EC-A5E4-4CCA-9CA4-268D30513C87', 'XPC_SERVICE_NAME': '0', 'PYTHONPATH': '/Users/seongjoo/Documents/development/lib/python', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.ILeUmF7JK5/Listeners', 'VIRTUAL_ENV': '/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv', 'SHELL': '/bin/bash', 'TMPDIR': '/var/folders/zx/sy2_rths0_vbqd4smg627p400000gn/T/', 'OLDPWD': '/Users/seongjoo/development/python', '__CF_USER_TEXT_ENCODING': '0x1F5:0x3:0x33', 'PWD': '/Users/seongjoo/development/python/wordCloud'}
    working_dir:  /Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/lib/python2.7/site-packages/pygame
    return (top 5 lines):
    Wrong JPEG library version: library is 80, caller expects 90
    loading pygame.tests.image_test
    
    
    ======================================================================
    ERROR: ImageextModuleTest.test_save_unicode_path
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/lib/python2.7/site-packages/pygame/tests/imageext_test.py", line 65, in test_save_unicode_path
        imageext.save_extended(im, temp_file)
    error: SavePNG: could not create png write struct
    
    ======================================================================
    ERROR: MixerMusicModuleTest.test_load
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/lib/python2.7/site-packages/pygame/tests/mixer_music_test.py", line 45, in test_load
        pygame.mixer.music.load(umusfn)
    error: Unrecognized music format
    
    ======================================================================
    ERROR: SurfaceTypeTest.test_image_convert_bug_131
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/seongjoo/Documents/development/python/wordCloud/brewPy2venv/lib/python2.7/site-packages/pygame/tests/surface_test.py", line 687, in test_image_convert_bug_131
        self.assertEquals( im.get_palette(),  ((0, 0, 0, 255), (255, 255, 255, 255)) )
    error: Surface has no palette to get
    
    
    ----------------------------------------------------------------------
    Ran 646 tests in 193.391s
    
    FAILED (failures=4, errors=5)
    
  3. Log in to comment