wlav / cppyy

Other
412 stars 42 forks source link

👮 Add a few property based tests stressing template parameter packs. #264

Open lukevalenty opened 1 month ago

lukevalenty commented 1 month ago

Added a few property based tests that will really stress out template parameter packs....sorry @wlav! 😅 Requires hypothesis python module. This is the same module and methodology I am using to test some of Intel's open source C++ libraries with.

https://hypothesis.readthedocs.io/en/latest/

lukevalenty commented 1 month ago

This will exercise the bugs in both #261 and #262.

wlav commented 1 month ago

Always in favor of more tests, albeit that yes, I'm using mostly bare, ancient style. I'll need to add hypothesis as an optional package to the requirements for a test (or dev) target and also prefer to give each set of tests a unique namespace to prevent spurious clashes (not too bad for functions as is the case here, as they're just overloads, but classes can't be redefined).

lukevalenty commented 1 month ago

I can update the PR and put the tests into a class, as well as the template fix you gave me in the other issue I filed.

lukevalenty commented 1 month ago

I'll need to add hypothesis as an optional package to the requirements for a test (or dev) target

I put the tests in their own namespace, but wasn't quite sure how to setup the requirements for hypothesis.