| 1 | # |
| 2 | # SelfTest/IO/__init__.py: Self-test for input/output module |
| 3 | # |
| 4 | # =================================================================== |
| 5 | # |
| 6 | # Copyright (c) 2014, Legrandin <[email protected]> |
| 7 | # All rights reserved. |
| 8 | # |
| 9 | # Redistribution and use in source and binary forms, with or without |
| 10 | # modification, are permitted provided that the following conditions |
| 11 | # are met: |
| 12 | # |
| 13 | # 1. Redistributions of source code must retain the above copyright |
| 14 | # notice, this list of conditions and the following disclaimer. |
| 15 | # 2. Redistributions in binary form must reproduce the above copyright |
| 16 | # notice, this list of conditions and the following disclaimer in |
| 17 | # the documentation and/or other materials provided with the |
| 18 | # distribution. |
| 19 | # |
| 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 23 | # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 24 | # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 25 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 26 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 27 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 28 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 29 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
| 30 | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 31 | # POSSIBILITY OF SUCH DAMAGE. |
| 32 | # =================================================================== |
| 33 | |
| 34 | """Self-test for I/O""" |
| 35 | |
| 36 | def get_tests(config={}): |
| 37 | tests = [] |
| 38 | from Crypto.SelfTest.IO import test_PKCS8; tests += test_PKCS8.get_tests(config=config) |
| 39 | from Crypto.SelfTest.IO import test_PBES; tests += test_PBES.get_tests(config=config) |
| 40 | return tests |
| 41 | |
| 42 | if __name__ == '__main__': |
| 43 | import unittest |
| 44 | suite = lambda: unittest.TestSuite(get_tests()) |
| 45 | unittest.main(defaultTest='suite') |
| 46 | |
| 47 |