Commit Graph

41 Commits

Author SHA1 Message Date
Mitchell Stokes ebe2588a50 Merge branch 'master' into deploy-ng 2018-05-06 11:21:13 -07:00
Mitchell Stokes 7073609480 deploy-ng: Use sys.executable instead of 'python' in tests/build_samples.py 2018-05-06 10:25:32 -07:00
rdb f986f8de1b showbase: add back clampScalar and PriorityCallbacks to PythonUtil
These were removed by 88dbb31daa under the assumption that they were not used, but it has recently come to my attention that there is still code out there that uses these.

PriorityCallbacks has been updated to be compatible with Python 3 by only comparing the priority, rather than the (priority, callback) tuple. This also has the side-effect of ditching the bisect dependency.

Also moves testing code from the source to the unit tests.
2018-04-21 11:43:46 +02:00
rdb fc172f8918 tests: fix unit test on 32-bit Ubuntu due to float imprecision 2018-04-20 12:48:26 +02:00
rdb 4877e8350d tests: fix unit test on 64-bit Ubuntu due to float imprecision
[skip ci]
2018-04-18 18:25:29 +02:00
rdb b0cece7faf Merge branch 'master' into deploy-ng 2018-04-08 15:44:32 +02:00
rdb 22f933a419 tests: disable datagram bytes() test on Python 2
See #297
2018-04-06 20:34:48 +02:00
rdb b4d29e6096 express: allow using bytes() on Datagram
Closes: #297
2018-04-06 17:42:59 +02:00
Mitchell Stokes d613523f14 deploy-ng: Add tests/build_samples.py script
This script will run python setup.py bdist_apps on each sample in a list
(currently only contains asteroids). The script will fail if any of the
builds fail. We can use this for some automated sanitity checking of
deploy-ng builds.
2018-03-22 18:53:26 -07:00
rdb aebdefcf60 Merge branch 'master' into deploy-ng 2018-03-11 23:01:10 +01:00
rdb bfff7e1000 tests: don't assert if pipe cannot create physical windows 2018-03-08 11:41:00 +01:00
rdb 43914f4e75 Merge branch 'master' into deploy-ng 2018-03-02 09:27:38 +01:00
rdb 9638eb47eb Add support for geometry with adjacency information
Example code: https://gist.github.com/rdb/7cebb8941b962c59d5a092048efb3855
2018-03-01 21:20:19 +01:00
rdb f535a641e4 Merge branch 'master' into deploy-ng 2018-02-27 20:53:28 +01:00
Sam Edwards 89be2c19af tests: Add tests for Datagram{,Iterator,InputFile,OutputFile}
This also includes a test for my previous commit which changes
DatagramInputFile::get_datagram().
2018-02-23 03:08:01 -07:00
rdb e0569815b5 tests: add test for prc page and one for light color temperature 2018-02-21 15:56:45 +01:00
Sam Edwards 7aedc21510 tests: Update audio test to recognize missing sounds as NullAudioSound 2018-02-20 00:55:49 -07:00
Sam Edwards bc88566906 tests: Add xfail test for loading a missing audio file 2018-02-19 19:15:08 -07:00
rdb 5c90f64182 text: fix is_whitespace() assertion when invalid chars are included 2018-02-17 20:50:18 +01:00
Mitchell Stokes 0c3c6c36bf deploy-ng: Fix loading submodules for hidden imports
Fixes #242
2018-02-12 22:21:14 -08:00
rdb d6cf575225 pgraph: fix LightAttrib.compose resulting in wrong on_light values 2018-01-26 14:30:21 +01:00
rdb f37c070c7c tests: cleanup GraphicsEngine to prevent shutdown freeze on windows
This occurs with the multithreaded render pipeline.  It's not an issue when using ShowBase because ShowBase also explicitly calls this during shutdown.
2018-01-03 00:07:50 +01:00
rdb 97eb734765 tests: add test cases for GLSL shaders 2017-12-24 20:46:53 +01:00
rdb 2f910ccd7c tests: fixes for the window tests 2017-12-24 20:34:06 +01:00
rdb c911ba8059 Merge branch 'master' of github.com:panda3d/panda3d into deploy-ng 2017-12-21 15:10:53 +01:00
rdb ed5e5386b9 AsyncFuture improvements, incl. support for gathering futures 2017-12-21 14:07:01 +01:00
rdb 9dcfcbf5fa texture: support store() on more component types (incl. sRGB)
This changes behaviour for sRGB textures, which weren't previously converting to the correct color space.

Also add unit tests for storing to PNMImage.

Closes: #212
2017-12-19 20:02:49 +01:00
rdb 348b1c344d texture: support uint/float/half/sRGB textures in TexturePeeker 2017-12-19 18:44:18 +01:00
rdb 2e20a0f16e Implement awaitable thread-safe future for async operations
This introduces AsyncFuture as a new base class of AsyncTask.  It's modelled after asyncio's Future class, except that it is thread-safe and you can use result() to block the current thread waiting for the future to finish (of course this is not necessary for use with coroutines).

AsyncFuture should be used for any operation that finishes in the future, to get the benefit of awaitability within coroutines as well as a standard interface for querying status and results of the operation as well as cancelling it.  As such, it's been implemented in various places, including texture.prepare() and win.trigger_copy().

Note that AsyncFuture is intended to be used *once*; it cannot be used more than once.  As an example of how this works, tex.prepare() will return the same future as long as the prepare isn't complete, but when it is done, subsequent calls to tex.prepare() will return a new future.
2017-12-04 22:25:28 +01:00
Mitchell Stokes 16255d528e deploy-ng: Lock tests app to pytest 3.2.0
pytest 3.3.0 brings in a pluggy dependency that cannot be satisfied with
wheels.
2017-12-03 17:24:53 -08:00
Mitchell Stokes d90e59ca2d Merge branch 'master' into deploy-ng 2017-12-02 18:36:47 -08:00
rdb 69b3468b2c interrogate: more improvements to seq/map wrappers
Gets rid of properties defined as both MAKE_SEQ_PROPERTY/MAKE_MAP_PROPERTY, which are just a bad idea. Instead, adds a way for map properties to define a separate "keys" interface.

Fixes: #203
2017-11-27 17:29:50 +01:00
Mitchell Stokes 905b15df01 deploy-ng: Rename some options
* include_paths -> include_patterns
  * exclude_paths -> exclude_patterns
  * deploy_platforms -> platforms
2017-11-26 15:33:00 -08:00
Mitchell Stokes 33fd302a8e deploy-ng: Add files to build application out of the unit tests
This will be a good way to make sure everything in the tests work under
a frozen environment.

NOTE: The application builds and runs, but no tests are collected. We
still need to figure out how we want to handle tests. Freeze them all
and modify test collection? Add py/test files to the build directory and
try to run them?
2017-11-25 17:36:02 -08:00
rdb 3be22679a4 display: also avoid getting more than 24 color bits if 0 were requested
See issue #197
2017-11-26 00:06:03 +01:00
rdb 0edac2e94a Work around gamma issue with 64-bit color depths on NVIDIA hardware 2017-11-16 23:52:12 +01:00
rdb 3621bd64c5 tests: add unit tests for bullet bam serializability 2017-11-08 01:56:31 +01:00
rdb dc1f5dd3b1 tests: fix syntax error on Python 3 2017-11-06 19:42:52 +01:00
rdb b73c627c61 tests: add interrogate tests for MAKE_PROPERTY et al 2017-11-06 13:02:23 +01:00
Mitchell Stokes aabf009ff0 tests: Add test_window_basic
This test just makes sure that created windows match the default
WindowProperties (with a few exceptions).

This also adds the following fixtures:

  * graphics_engine - scope='session', GraphicsEngine
  * graphics_pipe - scope='session', default GraphicsPipe
  * window - scope='test', GraphicsWindow with default framebuffer and window properties
2017-11-03 19:25:13 +01:00
Mitchell Stokes 9d7896ccc4 tests: Add simple NodePath tests using PyTest
These tests were converted from the tests branch with some changes:

  * Convert from unittest to PyTest
  * Update code to use new API (LVector3 instead of Vec3, properties, etc.)
2017-11-03 17:58:53 +01:00