Commit Graph

418 Commits

Author SHA1 Message Date
rdb 82a79acdd5 tests: Fix OverflowError in test_format_arrays on 32-bit
This is actually a bug in interrogate - it's converting an unsigned size_t via Py_ssize_t, which is not correct.  However, it's a bunch of trouble to fix that.

Cherry-picked from 84ada4d66b
2023-02-24 22:07:38 +01:00
rdb 6860c7776b tests: Fix unit test suite when building without physics or net 2023-02-23 00:20:53 +01:00
rdb 86ceade7b3 tests: Skip encrypt_string test when building without OpenSSL 2023-02-22 23:31:32 +01:00
rdb 84ada4d66b tests: Fix OverflowError in test_format_arrays on 32-bit
This is actually a bug in interrogate - it's converting an unsigned size_t via Py_ssize_t, which is not correct.  However, it's a bunch of trouble to fix that.
2023-02-22 23:29:37 +01:00
rdb 2e21cf87e4 tests: Skip test_task_cancel_waiting() test if no threads enabled 2023-02-22 23:18:23 +01:00
rdb a63bbba4c1 tests: Add HashVal md5 unit test that doesn't rely on hashlib 2023-02-22 21:55:26 +01:00
rdb 11c7d38ce4 tests: Remove executable permissions from test_property.py
[skip ci]
2023-02-22 18:20:39 +01:00
rdb 35348fd74a express: Do not rely on OpenSSL for MD5 hash support
These hashes are used in various places in the Panda codebase (for integrity checks, not for crypto), so using an internal implementation allows retaining this functionality when building Panda without OpenSSL.

Based on the following public domain implementation:
https://github.com/B-Con/crypto-algorithms
2023-02-22 16:47:14 +01:00
rdb 5d63c7e898 Merge branch 'release/1.10.x' 2023-02-20 19:27:58 +01:00
rdb 2e7dc9e4f4 tests: Add unit test for GeomVertexFormat arrays list 2023-02-20 19:05:37 +01:00
Timothy Paustian 50de135641
task: Fix re-adding task object removing extraArgs (#1132)
Fixes #1097
2023-02-13 10:58:02 +01:00
git2323 518d4777fa
do not prefer framebuffer configs with excessive multisamples (#1456)
Co-authored-by: user1 <user1@user1.org>
2023-02-12 23:04:46 +00:00
Rishabh Tewari dcd2aa83d4 tests: Added video and audio tests
Closes #663
2023-02-07 18:08:32 +01:00
rdb fed5865645 tests: Add unit tests for #1105 2023-02-07 12:24:54 +01:00
rdb 92185bcb28 Merge branch 'release/1.10.x' 2022-12-19 16:42:29 +01:00
rdb 896346b99f gobj: Implement `copy.deepcopy()` for Texture class
Actually ensures that the underlying RAM images are really fully unique.
2022-12-19 16:22:33 +01:00
rdb e67cd74725 express: Implement `copy.deepcopy()` for PointerToArray
It actually makes a unique copy of the underlying array.
2022-12-19 16:22:00 +01:00
rdb 7a55c723ba Merge branch 'release/1.10.x' 2022-12-04 19:28:03 +01:00
rdb 41f0c9d48d pgraph: Support None as second arg of replace_texture/replace_material
This removes the relevant texture or material
2022-12-04 19:24:04 +01:00
rdb d621df47ac prc: Fix bf-cbc encryption/decryption regression with OpenSSL 3.0
Loads the legacy provider to continue supporting this algorithm
2022-12-04 19:22:26 +01:00
rdb e961ea99ac Merge branch 'release/1.10.x' 2022-11-13 12:10:38 +01:00
rdb 0220a43ce0 shader: Fix support for `#pragma include <example.glsl>` in GLSL 2022-11-09 17:20:11 +01:00
rdb 63017864ab pgraph: Support any number of attribs in `RenderState::make()` in Python 2022-11-07 18:17:48 +01:00
rdb 4c58eb3382 tests: Replace use of deprecated imp module in test_imports 2022-10-31 23:21:54 +01:00
rdb 316b0009ae Merge branch 'release/1.10.x' 2022-10-31 23:10:39 +01:00
rdb 4c6df54d6f tests: Fix failing window unit test on macOS
Fixes #804 (together with previous commit 979f194f49)
2022-10-29 18:47:15 +02:00
rdb 979f194f49 tests: Load either 120 or 150 GLSL shaders depending on capabilities
Addresses part of #804
2022-10-29 18:46:59 +02:00
rdb a111bb4442 tests: skip auto-shader tests if Cg shaders are not supported
Backport of 57b0be8647
2022-10-29 18:16:58 +02:00
rdb 2a0da59dae tests: Add more tests for sphere-into-box 2022-10-05 14:55:46 +02:00
Derzsi Dániel d79709f004
express: Add support for bytes multifile encryption passwords (#1334) 2022-07-20 22:50:06 +02:00
rdb 20334cce05 Merge branch 'release/1.10.x' 2022-06-29 19:09:59 +02:00
Stephen A. Imhoff 33691d72ec bullet: Fix assertion when reconstructing BulletConvexHullShape from bam
Fixes #1251
Closes #1252
2022-06-29 17:06:19 +02:00
rdb 4df8c86590 tests: Add unit test for PandaNode prev_transform tracking mechanism 2022-02-24 11:43:44 +01:00
rdb 5695d1a719 tests: Add separate unit test for AsyncFuture.wait() with timeout
Since it's using a different implementation than the no-timeout version now
2022-02-24 11:43:11 +01:00
rdb a33fcab8da tests: Switch from deprecated ConditionVarFull to ConditionVar 2022-02-22 15:22:10 +01:00
rdb 7a2a83572c Merge branch 'release/1.10.x' 2022-01-05 08:50:11 +01:00
rdb d65ca1edd6 pgraph: Fix nodes with same key but diff value getting flattened
This was a regression from 69b3468b2c
2022-01-05 08:14:08 +01:00
rdb 60c5589671 pgraph: Optimize handling/checking of identity/invalid transforms 2021-11-16 17:30:36 +01:00
rdb a4ea476cce linmath: Implement read-only buffer protocol support for vectors
Fixes #1194
2021-10-27 10:53:35 +02:00
rdb 0ae8d8f315 tests: Robustify depth range test case 2021-08-31 14:02:49 +02:00
rdb 53741ffa13 pgraph: Implement new DepthBiasAttrib to replace DepthOffsetAttrib
Fixes #1157
2021-08-26 10:47:07 +02:00
rdb 280175f267 display: Support specifying depth range on DisplayRegion
See https://discourse.panda3d.org/t/depthoffsetattrib-z-range-composition-order/27943/4
2021-08-26 10:42:25 +02:00
rdb c293ad3da2 Merge branch 'release/1.10.x' 2021-08-03 20:19:15 +02:00
rdb f30019af13 tests: xfail vector floor division tests on Windows
Can't figure this one out for now.
2021-08-03 15:49:11 +02:00
rdb f27e9b2a86 linmath: Add __rmul__ operator for left scalar multiplication
Fixes #1048
2021-07-05 14:16:55 +02:00
rdb 199b797d72 Merge branch 'release/1.10.x' 2021-06-01 11:50:12 +02:00
rdb 5804c663a9 tests: Backport unit test fix from c0d3491223 2021-06-01 11:47:19 +02:00
rdb 2386e80448 linmath: Backport support for floor division to 1.10
Backport of 8944737844

(Also fixes return type of `__pow__` to always be derived class)
2021-06-01 10:45:56 +02:00
rdb 4e0e945279 linmath: Backport round(), floor(), ceil() support for vectors
See #821
2021-06-01 10:23:58 +02:00
rdb 5ef1b44455 event: cancel future being awaited when cancelling coroutine task
Fixes #1136
2021-04-18 17:05:00 +02:00
rdb cdf5b16ddd task: Add AsyncFuture::shield() ability, part of #1136
This is modelled after `asyncio.shield()` and can be used to protect an inner future from cancellation when the outer future is cancelled.
2021-04-09 18:28:07 +02:00
rdb eb6eb9f1dd Merge branch 'release/1.10.x' 2021-03-24 13:58:00 +01:00
rdb 8372b8150a gobj: Cube map sampling support in TexturePeeker
Closes #1098

Co-authored-by: Mitchell Stokes <mogurijin@gmail.com>
2021-03-24 12:50:42 +01:00
rdb 8bde2f2b1b tests: Add unit tests for GeomPrimitive::offset_vertices() 2021-03-22 22:04:08 +01:00
rdb 3732d3f1e6 PythonUtil: Fix Python 3 next() for SerialNumGen, AlphabetCounter 2021-03-22 21:49:58 +01:00
rdb 817f04d19e tests: Ignore DeprecationWarning in OnscreenText tests 2021-03-09 19:21:41 +01:00
rdb 050d86dadb event: AsyncFuture::set_result() behavior changes:
* Passing a Python subclass of a C++ class now works, the extra Python stuff isn't just discarded
* EventParameter objects are no longer automagically unwrapped - there's no more reason to pass an EventParameter to this method anyway, and it might be unexpected if it is treated specially.
2021-03-01 20:50:25 +01:00
rdb 8cbe36b352 Merge branch 'release/1.10.x' 2021-03-01 19:33:27 +01:00
rdb 064e0383be event: Allow AsyncFuture to store arbitrary PyObject result 2021-03-01 19:16:22 +01:00
rdb c0d3491223 tests: Test fewer numbers for vector floor divide test
Hopefully fix Windows test suite
2021-02-24 12:12:42 +01:00
rdb 8944737844 linmath: Support floor division for vector types
Also fix __pow__ so that it returns the derived type, not the base type
2021-02-22 20:01:30 +01:00
rdb c73c94c862 Merge branch 'release/1.10.x' 2021-02-06 01:23:34 +01:00
Stephen Imhoff a9f3940577 Add bullet ghost node test 2021-02-05 20:31:01 +00:00
rdb 842452594d Merge branch 'release/1.10.x' 2021-01-17 17:28:19 +01:00
rdb a5a0809949 gobj: Support integer texture formats in TexturePeeker 2021-01-17 15:27:19 +01:00
rdb 3479c6eee2 tests: Add unit tests for GLSL usampler/isamspler/uimage/iimage 2021-01-17 12:13:59 +01:00
rdb f20d859fe2 pgraph: Fix bug passing non-tuple sequence to shader input 2021-01-16 14:05:43 +01:00
rdb e099d9e787 Merge branch 'release/1.10.x' 2021-01-02 02:33:35 +01:00
rdb a84f1b5595 express: distinguish between null vs empty in CPTA pickle as well 2021-01-02 02:22:06 +01:00
rdb c81c506df3 express: Fix PointerToArray comparison operator 2021-01-01 17:54:09 +01:00
rdb b2462c1d8c express: Support pickling PointerToArray objects 2021-01-01 17:42:30 +01:00
rdb e755f87130 pgraph: Add pickling for LoaderFileTypeRegistry
Useful to test that pickling singletons works
2021-01-01 17:08:55 +01:00
rdb 3a5201fd65 tests: Add tests for pickling DoubleBitMask 2021-01-01 17:08:34 +01:00
rdb f8ce339960 collide: Add pickle support for most collision handlers
Also redo CollisionHandlerEvent pickling to use Datagram instead

Related to #1090
2021-01-01 16:56:18 +01:00
rdb 8852c835fc collide: Support pickling for CollisionTraverser, HandlerEvent+Queue
Fixes #1090
2020-12-31 16:57:34 +01:00
rdb a5557bc38d stdpy: Fix pickle sometimes duplicating Panda objects
We have to unify multiple Python wrappers pointing to the same C++ object.
2020-12-31 16:55:34 +01:00
rdb cf60284ca9 Merge branch 'release/1.10.x' 2020-12-31 00:05:10 +01:00
rdb a6580f5dd3 physics: Fix GlobalForceGroup 2020-12-30 23:57:43 +01:00
rdb c141bef19b stdpy: Add missing threading.ThreadError 2020-12-30 23:57:27 +01:00
rdb 65c1ef968c stdpy: Add PicklingError to pickle module 2020-12-30 22:34:44 +01:00
rdb 25b79a2aef Merge branch 'release/1.10.x' 2020-12-29 14:44:56 +01:00
rdb 2c209e0f02 stdpy: Fix direct.stdpy.pickle module for Python 3 2020-12-29 13:05:00 +01:00
rdb 2156e6deb2 Merge branch 'release/1.10.x' 2020-12-26 14:00:29 +01:00
rdb d5c2dc6447 dgui: Add setTextPos, etc. aliases for setPos
setPos will be deprecated in a future version.

See #1041
2020-12-26 13:59:19 +01:00
rdb 902ada10b8 gobj: Slight optimization for GeomTristrips::append_unused_vertices() 2020-12-14 11:11:46 +01:00
rdb 9f09857397 collide: Error checking for CollisionPolygon::setup/verify_points() 2020-12-12 17:28:41 +01:00
Daniel b31b100693 tests: Correct misleading comment
[skip ci]
2020-11-23 10:54:57 +01:00
Daniel ac6a1a7874 collide: Expose CollisionPolygon's setup_points and verify_points to Python
Closes #1035
2020-11-22 22:01:07 +01:00
rdb 93900a203e putil: Backport part of 9d8c523dfa
Fixes #886
2020-11-17 23:36:06 +01:00
rdb c788912070 Merge branch 'release/1.10.x' 2020-10-02 12:20:58 +02:00
rdb 6d228dfd2e express: Add ZipArchive class, support mounting zips to VFS 2020-10-01 23:58:27 +02:00
rdb 5d0044a481 tests: Add unit test for RenderEffects comparison 2020-09-16 23:38:56 +02:00
rdb 54b93116e8 Merge branch 'release/1.10.x' 2020-09-16 10:59:59 +02:00
rdb c646924f03 tests: remove occasionally-failing PythonUtil.weightedChoice test
It does not test a behavior of this function that we support, anyway.
2020-09-14 11:01:01 +02:00
rdb 921cbc6bae Merge commit 'e0d34131822a8852ff72dc9c5597f4dc6900719a' 2020-09-13 16:17:06 +02:00
rdb 56c33fb8b6 tests: add unit test for StreamReader.readlines() 2020-09-12 23:09:38 +02:00
rdb 707ea089cb Merge remote-tracking branch 'origin/release/1.10.x' 2020-09-01 11:09:29 +02:00
Derzsi Dániel 7f426ea64e
putil: Turn UniqueIdAllocator's free into an atomic operation (#999) 2020-08-29 15:17:20 +02:00
Daniel 95d1ac2f8b tests: Add proper tests for UniqueIdAllocator 2020-08-27 14:35:25 +02:00
Daniel 0d2dddd988 tests: Account for clock inaccuracies in all ClockObject tests
Closes #998
2020-08-27 14:33:20 +02:00
rdb 1236303acf tests: Add new unit test for Triangulator (also testing #985) 2020-08-18 18:38:19 +02:00
rdb b655aa86c5 Merge branch 'release/1.10.x' 2020-08-17 13:05:51 +02:00
Mitchell Stokes dd77bd4cdf
shadergen: Make use of material alpha if present (#925)
The material alpha overrides alpha values from flat color or vertex colors. This follows what the fixed-function pipeline does.

Fixes #912
2020-08-17 12:27:03 +02:00
rdb 9ac1a4f7cb tests: Add some unit tests for #987 2020-08-17 12:16:33 +02:00
rdb be24266715 tests: Copy some linmath/gobj tests over from master branch 2020-08-17 12:16:33 +02:00
rdb c7341bec26 tests: Fix Filename test to match paths case-insensitively 2020-08-17 12:16:33 +02:00
Tohka c4af56620b gobj: Support registering texture pool filters from Python code
Closes #954
2020-07-25 14:54:32 +02:00
rdb e787929c85 Merge branch 'release/1.10.x' 2020-06-29 14:50:59 +02:00
rdb f7cef5c284 tests: fix typo in TextureAttrib test 2020-06-29 12:49:26 +02:00
rdb 8d99f38aa2 tests: update TextureAttrib unit tests 2020-06-29 11:32:15 +02:00
Fireclaw 0f2cf6d14b Add maximized property to WindowProperties, plus implementation (#809)
Closes #809

Co-authored-by: rdb <git@rdb.name>
2020-06-20 23:00:52 +02:00
rdb 4a21329a79 Merge remote-tracking branch 'origin/release/1.10.x' 2020-06-20 19:49:55 +02:00
rdb 913ab6669e tests: Add more attribute tests to try to make coverage deterministic 2020-06-15 15:20:38 +02:00
rdb d01c53c2d8 Merge branch 'release/1.10.x' 2020-06-14 13:02:25 +02:00
rdb a9b158192f putil: fix crash in BitArray::has_any_of() 2020-06-14 12:55:52 +02:00
rdb 55951c3025 pgraph: fix has_tags() after clearing Python tags
Fixes #936
2020-06-02 20:31:18 +02:00
rdb c218af2f49 tests: Make ClockObject test a little laxer again
This failed on the Windows builder because apparently time.sleep is apparently not super precise on Windows.
2020-05-19 21:59:48 +02:00
rdb 9ad4e4586c collide: Use correct intersection point for sphere into poly
Previously, the reported surface and intersection points could be outside the polygon if the sphere was colliding with the edge.

Fixes #907
2020-05-05 16:52:21 +02:00
rdb b85df6d9ed tests: Change unreliable ClockObject test
The tests are randomly failing due to more time being elapsed.  On a busy buildbot we don't really have any guarantee that the test doesn't take longer than the threshold.
2020-05-05 14:36:04 +02:00
Rishabh Tewari e2ec8ecbf0 tests: Improve ClockObject tests
Closes #898
2020-05-05 13:28:47 +02:00
rdb bfbbcad990 task: Support calling cancel() on currently awaiting futures
Fixes #911
2020-05-05 13:21:49 +02:00
rdb d799a09002 cleanup: Remove support for EOL versions of Python
Fixes #905
2020-04-26 20:07:56 +02:00
rdb e2177ecbdb Merge branch 'release/1.10.x' 2020-04-26 00:16:25 +02:00
Ashwini 80ab6a28c4 pnmimage: Added offset to add_sub_image and mult_sub_image
Closes #903
2020-04-25 22:56:40 +02:00
rdb ba010168cf tests: more improvements to test suite coverage 2020-04-25 14:44:43 +02:00
rdb ad296492f8 tests: add more TextureAttrib comparison tests
This will hopefully cover all the lines that are hit non-deterministically by codecov.
2020-04-25 10:36:23 +02:00
rdb a01711148b tests: add an assorted variety of unit tests
I'm mostly trying to make sure we have over-coverage for a couple of places that are being hit intermittently by our current unit tests, generating noisy codecov reports.  If we make sure these places are hit always, we hopefully won't have codecov misreport lost/gained coverage for unrelated changes.
2020-04-02 13:45:09 +02:00
rdb 9d8c523dfa putil: Assorted improvements to BitArray, SparseArray, *BitMask*:
* Support converting BitMask types to int
* BitArray constructor accepts a Python long of arbitrary size
* DoubleBitMask (and QuadBitMask, by extension) supports Python long in constructor
* Support for pickling (except DoubleBitMask)
* All of them now properly define __bool__()
* More unit tests

Fixes #886
2020-04-01 20:31:16 +02:00
rdb 30d9f88f8e Merge branch 'release/1.10.x' 2020-04-01 18:53:00 +02:00
rdb 064da09cf0 putil: add pickling support to Datagram class 2020-04-01 18:25:43 +02:00
Fireclaw c73415b4ba dgui: fix sizing after changing Slider/Scrollbar orientation
Closes #700
2020-02-23 16:28:40 +01:00
Thaumaturge 50d27166d8 particles: expose birth_litter() to support burst emission
Closes #524
Closes #340
2020-02-23 15:17:57 +01:00
rdb fda898807a Merge branch 'release/1.10.x' into master 2020-02-10 13:52:05 +01:00
Fireclaw 5d93237386 dgui: fix regression in DirectScrolledFrame (see #699)
Made initialization ignore the setScrollBarWidth function
Respect the length/height of the scrollbar and only change the actual
width in the setScrollBarWidth function
Added a very basic unittest class for the scrolledFrame

Closes #864
2020-02-10 13:17:05 +01:00
rdb 6c66c8618d tests: add unit test for passing plain mat3/mat4 to GLSL shader 2020-01-25 17:00:48 +01:00
rdb 508444d27f tests: use unique, non-interned keys for property refcount tests
There is an intermittent build failure and I suspect it's because the keys are too generic and are interned, and thus may have their refcount incremented or decremented by some other (background?) process.
2020-01-22 12:01:27 +01:00
Leandro (Cerberus1746) Benedet Garcia ffed59679d tests: add more unit tests for vector classes
Closes #826
2020-01-21 15:27:34 +01:00
rdb a8a775ad09 Merge branch 'release/1.10.x' 2020-01-04 02:49:28 +01:00
rdb cef70a4fe5 tests: remove __gt__ asserts from test_shaderinput_vector_compare
This fails in Python 2, and we don't actually provide this operator or make any guarantees about greater-than ordering, so it was silly to test for it to begin with.
2020-01-04 01:21:54 +01:00
rdb b60c3e6c7e tests: add unit tests for ShaderInput comparison (#827) 2020-01-03 18:52:55 +01:00
Leandro (Cerberus1746) Benedet Garcia 12f8363284 linmath: support round(), floor(), ceil() in vector classes
Closes #821
2019-12-30 03:06:00 +01:00
rdb b78b7be326 Merge branch 'release/1.10.x' 2019-12-30 01:50:54 +01:00
rdb b9713f71b1 tests: add some DCPacker unit tests (for #751) 2019-12-25 16:58:11 +01:00
rdb 2801165db3 tests: add unit tests for DirectFrame 2019-12-11 18:02:17 +01:00
Brian Lach 48ff3aeb08 pgraph: use bit flags instead of incremental enum for ShaderAttrib flags
The flags in the enum are actual bit flags instead of indices. This allows for setting/clearing a mask of flags in one go, rather than having to set each flag in its own function call. Existing code shouldn't be affected.

Closes #688
2019-12-11 16:49:42 +01:00
leotada 636c3d044a bullet: change wheel get/setSteering to use degrees
Fixes #757
Closes #784
2019-12-11 16:49:42 +01:00
hitesh4 cf4d418f2f tests: add unit tests for GeomVertexReader
Closes #604
2019-12-11 16:49:34 +01:00
rdb d088263f6f Merge branch 'release/1.10.x' 2019-11-11 03:28:39 +01:00
Thaumaturge 76d6b7ce58 tests: add unit tests for particle systems and #769 in particular
Co-authored-by: rdb <git@rdb.name>
2019-11-10 20:34:03 +01:00
rdb 847ebf667f Merge branch 'release/1.10.x' 2019-11-06 10:49:05 +01:00