Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/linsomniac/python-unittest-skeleton
A skeleton Python unit test to boot-strap projects.
https://github.com/linsomniac/python-unittest-skeleton
Last synced: 11 days ago
JSON representation
A skeleton Python unit test to boot-strap projects.
- Host: GitHub
- URL: https://github.com/linsomniac/python-unittest-skeleton
- Owner: linsomniac
- Created: 2012-10-08T05:58:21.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-10-16T02:53:28.000Z (about 11 years ago)
- Last Synced: 2023-03-11T11:42:42.646Z (over 1 year ago)
- Language: Python
- Size: 154 KB
- Stars: 51
- Watchers: 9
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
Python Unittest Skeleton
========================This is a skeleton Python unittest file to allow it to be grabbed and
filled in, instead of having to remember the structure.The "test_skeleton.py" is an example of standard Python tests.
The "test_bottle.py" is some test code for a Bottle web application.
The "cli_skeleton" is an example of testing a command-line application.
The "test_faketcpserver.py" includes sample code which uses the
faketcpserver module, mentioned below, to test code reaction to
misbehaving TCP servers."faketcpserver.py" has code to create a fake TCP server which you can
provide a script to emulate certain send/receive/hangup behavior, to
simulate a TCP server that misbehaes or disconnects. Examples are in
"test_skeleton.py".Usage
-----To use:
* Check out repository.
* Copy "tests/test_skeleton.py" into your "test" directory.
* Rename "test_skeleton.py" to something more descriptive. (Note: It
should keep the "test_" prefix, so that "make" will run the tests).* Edit this file and search for "XXX".
* Copy "Makefile" into your tests directory. It should work without
modification.* If you are doing bootle web development, copy "test_bottle.py" into
your "tests" directory and rename it to something more useful.* If you have a CLI program, use the "cli_skeleton" in the top level
directory instead.