| 1 | # -*- coding: utf-8 -*- |
| 2 | # |
| 3 | # SelfTest/Signature/__init__.py: Self-test for signature modules |
| 4 | # |
| 5 | # =================================================================== |
| 6 | # The contents of this file are dedicated to the public domain. To |
| 7 | # the extent that dedication to the public domain is not available, |
| 8 | # everyone is granted a worldwide, perpetual, royalty-free, |
| 9 | # non-exclusive license to exercise all rights associated with the |
| 10 | # contents of this file for any purpose whatsoever. |
| 11 | # No rights are reserved. |
| 12 | # |
| 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 14 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 15 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 16 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
| 17 | # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
| 18 | # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 19 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 20 | # SOFTWARE. |
| 21 | # =================================================================== |
| 22 | |
| 23 | """Self-test for signature modules""" |
| 24 | |
| 25 | import unittest |
| 26 | from . import test_pkcs1_15, test_pss, test_dss, test_eddsa |
| 27 | |
| 28 | |
| 29 | def get_tests(config={}): |
| 30 | tests = [] |
| 31 | tests += test_pkcs1_15.get_tests(config=config) |
| 32 | tests += test_pss.get_tests(config=config) |
| 33 | tests += test_dss.get_tests(config=config) |
| 34 | tests += test_eddsa.get_tests(config=config) |
| 35 | return tests |
| 36 | |
| 37 | |
| 38 | if __name__ == '__main__': |
| 39 | def suite(): |
| 40 | return unittest.TestSuite(get_tests()) |
| 41 | unittest.main(defaultTest='suite') |