Frequently Asked Questions


What is Pythoscope?

Pythoscope is a unit test generator for programs written in Python. It means it can produce a test suite that captures current behavior of your application (so called characterization tests). If you have a system written in Python and value testing, Pythoscope can help you achieve a high test coverage.

Why should I use Pythoscope?

If you want to introduce testing to your project, Pythoscope will be helpful to you, regardless if you're just starting out, or your project is in maintenance mode.

Having a comprehensive set of automated unit tests allows to make changes to the software quicker, by:

  • reducing the number of bugs introduced during modification of a system,
  • localizing defects much quicker (and at the same time reducing the need for debugging),
  • helping developers understand the system,
  • making the development process more predictable,
  • and more.

For more comprehensive discussion of unit test benefits see:

Does Pythoscope support iterative development?


As you modify your system you can run Pythoscope over and over again to complement the test suite with the newly added behavior. At the same time you are free to remove and/or modify those tests - Pythoscope will leave your changes intact.

How stable Pythoscope is?

Pythoscope is in an experimentation stage of development, so stability is not our main priority right now. Having said that, it shouldn't overwrite or delete any of your files, so you're free to experiment. The worst thing that can happen is that you'll get a Python stack trace. In that case, please report a bug. :-)

If you want to interface with Pythoscope (for example, for editor integration), please let us know, so we could take future API changes into consideration.

What license does Pythoscope use?

All Pythoscope code is licensed under MIT license. Pythoscope releases include a lib2to3 library, which is licensed under PSF license.

Installation and usage

Where can I get Pythoscope?

After each release we publish packages in the following places:

If you want the latest development version use bazaar:

$ bzr branch lp:pythoscope

What versions of Python are supported?

Since release 0.4.2 Pythoscope supports Pythons 2.3 through 2.6. Python 3.0 is not supported yet. Let us know if you need Python 3.0 support.

What OSes are supported?

Pythoscope works on Linux, Windows and MacOS.

What about Jython, IronPython or PyPy?

Currently Pythoscope is developed on CPython exclusively and we have never tested it on alterive implementations. Eventually we'd like to support all Python implementations, so if you're adventurous please do try Pythoscope on the implementation of your choice and let us know of your findings.

Can I use an existing unit test as a point of entry?

Yes, you can. Because Pythoscope doesn't execute points of entry in separate modules, you won't be able to use unittest.main() to run them though. Use the following snippet to run a test class (see unittest module documentation for details):

suite = unittest.TestLoader().loadTestsFromTestCase(YourTestClass)


Where do I go for help?

The best place to get help is the pythoscope mailing list. Both Pythoscope users and developers hang out there, so you're free to ask there all kinds of questions related to Pythoscope. If you'd rather use a private channel, just drop us a line at gro.epocsohtyp|srepoleved#gro.epocsohtyp|srepoleved.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License