Lots of Zenmap's component Python modules have unit tests of some sort or other, but many are just "run this function if __name__=='__main__'" type of things. We currently use the test discovery built in to Python 2.7's unittest library, so this task could be taken in a few different steps:
- Convert existing tests to
unittest test cases so that autodiscovery can pick them up.
- Add new test cases for functions and modules not covered by any tests.
- Use a more robust testing structure (like a
zenmap/tests/ directory) so we don't rely on autodiscovery, which doesn't work on Python 2.6 and earlier.
Lots of Zenmap's component Python modules have unit tests of some sort or other, but many are just "run this function
if __name__=='__main__'" type of things. We currently use the test discovery built in to Python 2.7'sunittestlibrary, so this task could be taken in a few different steps:unittesttest cases so that autodiscovery can pick them up.zenmap/tests/directory) so we don't rely on autodiscovery, which doesn't work on Python 2.6 and earlier.