├── .gitignore ├── HTMLTestRunner.py ├── README.md ├── __init__.py ├── db_config.ini ├── db_fixture ├── __init__.py ├── mysql_db.py └── test_data.py ├── interface ├── __init__.py ├── add_event_test.py ├── add_guest_test.py ├── get_event_list_test.py ├── get_guest_list_test.py └── user_sign_test.py ├── report └── 2020-04-19 10_28_01_result.html └── run_tests.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | __pycache__/ 3 | -------------------------------------------------------------------------------- /HTMLTestRunner.py: -------------------------------------------------------------------------------- 1 | """ 2 | A TestRunner for use with the Python unit testing framework. It 3 | generates a HTML report to show the result at a glance. 4 | The simplest way to use this is to invoke its main method. E.g. 5 | import unittest 6 | import HTMLTestRunner 7 | ... define your tests ... 8 | if __name__ == '__main__': 9 | HTMLTestRunner.main() 10 | For more customization options, instantiates a HTMLTestRunner object. 11 | HTMLTestRunner is a counterpart to unittest's TextTestRunner. E.g. 12 | # output to a file 13 | fp = file('my_report.html', 'wb') 14 | runner = HTMLTestRunner.HTMLTestRunner( 15 | stream=fp, 16 | title='My unit test', 17 | description='This demonstrates the report output by HTMLTestRunner.' 18 | ) 19 | # Use an external stylesheet. 20 | # See the Template_mixin class for more customizable options 21 | runner.STYLESHEET_TMPL = '' 22 | # run the test 23 | runner.run(my_test_suite) 24 | ------------------------------------------------------------------------ 25 | Copyright (c) 2004-2007, Wai Yip Tung 26 | All rights reserved. 27 | Redistribution and use in source and binary forms, with or without 28 | modification, are permitted provided that the following conditions are 29 | met: 30 | * Redistributions of source code must retain the above copyright notice, 31 | this list of conditions and the following disclaimer. 32 | * Redistributions in binary form must reproduce the above copyright 33 | notice, this list of conditions and the following disclaimer in the 34 | documentation and/or other materials provided with the distribution. 35 | * Neither the name Wai Yip Tung nor the names of its contributors may be 36 | used to endorse or promote products derived from this software without 37 | specific prior written permission. 38 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 39 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 40 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 41 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 42 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 43 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 44 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 47 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 48 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | """ 50 | 51 | # URL: http://tungwaiyip.info/software/HTMLTestRunner.html 52 | 53 | __author__ = "Wai Yip Tung , bugmaster" 54 | __version__ = "0.9.0" 55 | 56 | """ 57 | Change History 58 | 59 | Version 0.9.0 60 | * Increased repeat execution 61 | * Added failure screenshots 62 | 63 | Version 0.8.2 64 | * Show output inline instead of popup window (Viorel Lupu). 65 | 66 | Version in 0.8.1 67 | * Validated XHTML (Wolfgang Borgert). 68 | * Added description of test classes and test cases. 69 | 70 | Version in 0.8.0 71 | * Define Template_mixin class for customization. 72 | * Workaround a IE 6 bug that it does not treat 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | %(stylesheet)s 193 | 194 |
195 | 377 | %(heading)s 378 | %(report)s 379 | %(ending)s 380 | %(chart_script)s 381 | 382 |