Source

pygame / test / surfarray_test.py

Author Commit Message Labels Comments Date
Lenard Lindstrom
Let _numpysurfarray.blit_array and make_surface methods accept float arrays ( closes #81 ) As requested, surfarray once again excepts numpy arrays with a float dtype. Float values are rounded to int with the numpy.rint ufunc. In Pygame 1.9.1, floats were simply truncated.
Lenard Lindstrom
Surface.get_view('2') now returns a view for 24 bit surfaces. pixelcopy.map_surface now accepts 24 bit integers in target array. pixelcopy.map_surface properly handles 1 dimensional indices in source array. Color type exports array struct interface; can be used as map_surface source array.
Lenard Lindstrom
add updates to surface.c, etc that were skipped in the merge with the surface_buffer branch
Lenard Lindstrom
Merge the surface_buffer branch back into trunk. 1) Rename module _arraysurfarray to pixelcopy, which implements array_to_surface (blit_surface), surface_to_array, and map_array. 2) Reimplement _numpysurfarray methods array2d, array3d, array_alpha, array_colorkey, and map_surface to use new pixelcopy methods. Module pixelcopy reimplements _numericsurfarray using generic copy methods that accept objects exporting an array struct interface. Along with Surface views, it moves almost all of the _numpysurfarray.py functionality into C code. pixelcopy is also independent of NumPy, so can work with other array like objects.
Lenard Lindstrom
remove gc calls from unit tests; if an object is not collected when its refcount reaches 0 there is a problem.
Lenard Lindstrom
Merge the buffer branch back into trunk. 1) Extend pygame.mixer.Sound() to load samples from an object with an array struct interface or the new buffer protocol. Exports an array struct interface. 2) Update sndarray to use the new Sound features on numpy arrays, removing the Python array manipulation code. 3) Add a new Type, pygame._view.View as a proxy for exporting an array struct interface. 4) Add the pygame.Surface.get_view() method,…
Lenard Lindstrom
implement *_tags.py module replacement to *_test.py level tags. Now tests for unbuilt modules can be more easily skipped. Also the IGNORE and SUBPROCESS_IGNORE black lists in test/__init__.py goes away, replaced with *_tags.py tags.
Lenard Lindstrom
undo broken rev 2111
Lenard Lindstrom
add automatic skip of unimplemented modules to run_tests.py framework
Lenard Lindstrom
allow all Python modules to install with Python 3.1, though some may not work correctly
Lenard Lindstrom
Add conditional bufferproxy imports to __init__.py. This ensures its present when dependent modules are imported. It also prompts py2exe/py2app to include bufferproxy.
Lenard Lindstrom
_numpysurfarray.array_alpha() bug with per-pixel alpha surfaces having blanket alpha 0
Lenard Lindstrom
fix surfarray_test.py for Numeric
Lenard Lindstrom
fill in sndarray tests and fix uncovered bugs
Lenard Lindstrom
surfarray tests for make_surface, map_array, pixels2d and pixels_alpha, Finished surfarray_test.py
Lenard Lindstrom
add array_alpha and array_colorkey tests to surfarray_test.py. array_alpha values incompatible with unmap_rgb for 16 bit surfaces - fixed in _numpysurfarray.py, ignored in deprecated _numericsurfarray.c.
Lenard Lindstrom
make surfarray_test skip tests known to fail with Numeric
Lenard Lindstrom
add surfarray.array2d, array3d, pixels2d and pixels3d unit tests
Lenard Lindstrom
fix pygame.init() problem in surfarray_test.py
Lenard Lindstrom
surfarray get_arraytype, get_arraytypes and use_arraytype tests
Lenard Lindstrom
surfarray.array3d unit test and 16 bitsize bug fix
Lenard Lindstrom
move surfarray surface lock test to surfarray_test.py
Lenard Lindstrom
add array2d test to surfarray_test.py
Lenard Lindstrom
add array tags to tests requiring NumPy or Numeric
Lenard Lindstrom
surfarray_test does nothing if no array module installed
Lenard Lindstrom
add blit_array test for surface shifts
Lenard Lindstrom
new _arraysurfarray module. blit_array bug 24 fix. blit_array now sets alpha to 255 for 3D array blit onto a SRCALPHA surface. _arraysurfarray is the foundation for adding new C surfarray C functions. It uses the array interface so works with the Numeric 24.2 as well. It has no NumPy specific code, doesn't include NumPy or Numeric headers.
Lenard Lindstrom
test suite now pygame.tests subpackage as well
akalias
Made all unimplemented tests use todo_test_xxxx naming and updated the __doc__'s. Run's only implemented tests by default.
akalias
made trunk/test a package, added in python2.5 version of unittest as test.unittest.
  1. Prev
  2. 1
  3. 2
  4. Next