Skip to content

Commit

Permalink
Add a runner for unit tests.
Browse files Browse the repository at this point in the history
(This is currently only the RIPEMD-160 test.)

Signed-off-by: Daira Hopwood <[email protected]>
  • Loading branch information
daira committed Sep 29, 2022
1 parent aaa4e95 commit e7b4847
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ after adjusting:
- `poetry run SCRIPT_NAME [-t json|rust|zcash]`
- `SCRIPT_NAME` is one of the scripts listed in `pyproject.toml`.

To run unit tests, use ``poetry run test``.

## License

Licensed under either of
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ orchard_note_encryption = "zcash_test_vectors.orchard.note_encryption:main"
orchard_poseidon = "zcash_test_vectors.orchard.poseidon:main"
orchard_poseidon_hash = "zcash_test_vectors.orchard.poseidon:hash_test_vectors"
orchard_sinsemilla = "zcash_test_vectors.orchard.sinsemilla:main"

test = "test:test"
11 changes: 11 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2022 The Zcash developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php .

import unittest

def test():
loader = unittest.TestLoader()
suite = loader.discover('.', pattern='*.py')
runner = unittest.TextTestRunner()
runner.run(suite)

0 comments on commit e7b4847

Please sign in to comment.