lib: Create a generic property testing framework#212858
lib: Create a generic property testing framework#212858infinisil wants to merge 1 commit intoNixOS:masterfrom
Conversation
|
While this was interesting to create, and I updated pythonix to the latest Nix version in this fork's commit, but I'm considering upstreaming those bindings to Nix, such that they don't need to be maintained independently anymore. |
|
I'm closing this since there's now a PR to have Python bindings for Nix (outdated, won't get merged), and another one for C bindings (could get merged). Any of those approaches would be better than this hack here :). |
Description of changes
In #205190 some property tests were added, but extending those turns out to be pretty hard, which was noticed in #209099 when trying to add more.
This is a draft for a new generic property-testing framework that's pretty simple to use. It should eventually be usable for all the path library functions from #210426
This work is sponsored by Antithesis ✨
Example
Here's a messed up regex for the
lib.path.subpath.isValidcheck:And this is what you get when you try to run the property tests: