https://git.schokokeks.org/derivepassphrase.git/tree/b0038660e3efed0577ad5c08523d69a70a13bfebRecent commits to derivepassphrase.git (b0038660e3efed0577ad5c08523d69a70a13bfeb)2025-01-27T00:35:36+01:00tag:gitlist.org,2012:commit/b0038660e3efed0577ad5c08523d69a70a13bfebAdd hypothesis-based service name type tests for the "vault" module2025-01-27T00:35:36+01:00Marco Riccisoftware@the13thletter.info
<pre>Check that equivalent service name strings, byte strings and byte arrays
all derive the same passphrases.
</pre>
tag:gitlist.org,2012:commit/3450dc6b4e2ca1c160fb5341e24ba49f6a3de18cSignal failed assumptions instead of passing tests in the "vault" module2025-01-26T23:42:36+01:00Marco Riccisoftware@the13thletter.info
<pre>One hypothesis-enabled test function of the "vault" module tests that
the constructor accepts a given set of settings. While the generator
attempts to yield only satisfiable settings, there are certain settings
that cannot derive a passphrase for one service name, but can derive one
for other names. In these cases, the specific generated characters and
occurrence limitations together disallow all otherwise eligible
candidates for the next character.
Tests with such configurations should actually be skipped, but
hypothesis-based tests need different skip handling than normal
pytest-based tests. Previously we would "fake" skipping by silently
returning early, which suggests that the test actually *passed*. Now,
we use `hypothesis.assume` to signal to hypothesis to generate
a different datum instead.
</pre>
tag:gitlist.org,2012:commit/fe0c9ed2905b4cecf92062921c3035b0a29ddf29Document hypothesis examples for "vault" tests the proper way2025-01-26T23:40:15+01:00Marco Riccisoftware@the13thletter.info
<pre>Use `hypothesis.example(...).via(...)` instead of source code comments.
</pre>
tag:gitlist.org,2012:commit/e3b9a55dcbd793977d8e3373bd24892f04199b2cRearrange hypothesis tests in the `vault` module2025-01-26T20:10:35+01:00Marco Riccisoftware@the13thletter.info
<pre>Just like in 9db6c6591de054433ae98d59f7930364e7d03286 for the
`ssh_agent` tests, arrange the `vault` hypothesis tests so that they lie
next to the respective non-hypothesis test, if any. Also rename and/or
renumber them as necessary.
</pre>
tag:gitlist.org,2012:commit/1291fcbc59d4a4ea9e8c60fb5502f51854b09861Rearrange hypothesis tests in the `ssh_agent` module2025-01-26T16:34:47+01:00Marco Riccisoftware@the13thletter.info
<pre>Arrange the hypothesis tests so that they lie next to the respective
non-hypothesis test, if any, instead of bundling them all in the same
testing class. By doing this, related tests are closer to each other,
if possible. Use the hypothesis mark instead of the testing class if
filtering is required.
Additionally, since the helper functions `as_ssh_string`,
`canonicalize1` and `canonicalize2` now are visible in and assigned to
a broader context, give them proper docstrings.
</pre>
tag:gitlist.org,2012:commit/7c5ca4b3edb7babde9c8dd1a5e6eebd5cbe52638Add more hypothesis tests for the `ssh_agent` module2025-01-26T16:21:45+01:00Marco Riccisoftware@the13thletter.info
<pre>Add more hypothesis tests for SSH string encoding and decoding, based on
David R. MacIver's articles. Also document the explicit examples in the
proper way.
</pre>
tag:gitlist.org,2012:commit/d2fc4003bd5b81a3a6063007c5e42a5aa1bfc884Fix improper `re` escape pattern in `ssh_agent` tests2025-01-26T16:17:09+01:00Marco Riccisoftware@the13thletter.info
<pre></pre>
tag:gitlist.org,2012:commit/6367e1a267c8eb3ab1696a02be42ff929d5ea7ceAdd hypothesis tests for the `exporter` module2025-01-25T23:29:34+01:00Marco Riccisoftware@the13thletter.info
<pre>Add hypothesis tests for vault key discovery and for registring vault
configuration data export handlers, each via their own parameter object
and corresponding hypothesis strategy, and convert all existing explicit
parametrized tests to hypothesis examples.
</pre>
tag:gitlist.org,2012:commit/f797b3c6e22947c9df1f79bf156934338b876d10Add hypothesis tests for the `sequin` module2025-01-25T23:28:10+01:00Marco Riccisoftware@the13thletter.info
<pre>Add hypothesis tests for big endian number parsing, the sequin
constructor, the generation and the bit shifting steps, each via their
own parameter object and corresponding hypothesis strategy, and convert
all existing explicit parametrized tests to hypothesis examples. (The
strategy may be trivial, however.) Besides the existing helper function
`bitseq`, we add a new `bits` helper function, and add hypothesis tests
for both of these helper functions as well.
</pre>
tag:gitlist.org,2012:commit/06c392fa7488cc1e250c165b3fe9a279357af758Remove use of the monkeypatch test fixture in favor of the context manager2025-01-25T22:15:53+01:00Marco Riccisoftware@the13thletter.info
<pre>The `pytest.MonkeyPatch.context` context manager is just as easy to use,
and does not interfere with hypothesis.
</pre>