Commit Graph

4 Commits

Author SHA1 Message Date
rdb 88f8071dfc tests: add unit tests for direct.showbase.Loader.Loader class 2019-08-22 10:45:36 +02:00
pythonengineer 46a3a72029 PythonUtil: weightedChoice should throw IndexError on empty list
Also includes a unit test.

Closes #682
2019-07-15 19:39:31 +02:00
rdb 0c5546bcb0 tests: add unit tests for Audio3DManager sound velocity 2019-01-06 09:32:41 +01: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