mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-10-05 15:08:25 +00:00
* Makes our existing mnemonic_generation.oy accessible as an interactive CLI utility for converting dice rolls or coin flips into 12- or 24-word mnemonics as well as the final word calculation. * Reduces python dependencies in mnemonic_generation.py * Removes need to always specify `wordlist_language_code`. * Adds constants for number of dice rolls for each mnemonic phrase length (since 99 may become 100 soon). * Generates test dice rolls, coin flips, or word selections via its "rand12" and "rand24" option. * Adds support for coin flips, even though the SeedSigner UI does not support coin flips yet (and might not ever). * Updates dice_verification.md accordingly.
Running Tests
The tests are designed to be run on non-Raspi hardware.
On your testing machine you'll have to install:
# general dependencies
pip3 install -r requirements.txt
# test suite dependencies
pip3 install -r tests/requirements.txt
Then make the seedsigner python module visible/importable to the tests by installing it:
pip3 install -e .
Run the whole test suite:
pytest
Run a specific test file:
pytest tests/test_this_file.py
Run a specific test:
pytest tests/test_this_file.py::test_this_specific_test
Test Coverage
Run tests and generate test coverage
coverage run -m pytest
Show the resulting test coverage details:
coverage report
Generate the html overview:
coverage html