Testing your Python code with PyCharm

Everybody knows that getting used to writing the testing code in parallel with the running code is a good habit. Used wisely, this method helps you define more precisely your code’s intent and find bugs ASAP, thus saving many hours of debugging that would otherwise have been needed in later phases of the software development cycle.

There is a bunch of testing frameworks available for Python which helps you with keeping your code consistent. PyCharm supports most well-known testing frameworks, such as: Attest, Doctest, Nosetest, py.test and of course Unittest.

We have prepared the Creating and running a Python unit test tutorial. From this simple tutorial you’ll learn how PyCharm helps creating and running Python unit tests with a couple of shortcuts. Try it, use it, and do not forget to explore the graphical test runner embedded in PyCharm.

As always, we appreciate your feedback in the comments below or in our forum!

Develop with pleasure!
– PyCharm Team

This entry was posted in Cool Feature. Bookmark the permalink.

4 Responses to Testing your Python code with PyCharm

  1. ivanelson says:

    This IDE should have feature was “Drag” and “Drop” For Python and PyQt.

  2. Cezar says:

    Sadly I’ve never been able to get it to work with django-nose tests

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>