Book Image

Mastering IPython 4.0

By : Thomas Bitterman, Dipanjan Deb
Book Image

Mastering IPython 4.0

By: Thomas Bitterman, Dipanjan Deb

Overview of this book

IPython is an interactive computational environment in which you can combine code execution, rich text, mathematics, plots, and rich media. This book will get IPython developers up to date with the latest advancements in IPython and dive deep into interactive computing with IPython. This an advanced guide on interactive and parallel computing with IPython will explore advanced visualizations and high-performance computing with IPython in detail. You will quickly brush up your knowledge of IPython kernels and wrapper kernels, then we'?ll move to advanced concepts such as testing, Sphinx, JS events, interactive work, and the ZMQ cluster. The book will cover topics such as IPython Console Lexer, advanced configuration, and third-party tools. By the end of this book, you will be able to use IPython for interactive and parallel computing in a high-performance computing environment.
Table of Contents (18 chapters)
Mastering IPython 4.0
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
6
Works Well with Others – IPython and Third-Party Tools
Index

Unit testing


While there are many types of testing (for example, acceptance testing, integration testing, and stress testing), this chapter will concentrate on unit testing. There are three reasons for this concentration:

  1. Unit tests are more likely to be language-specific. While other test frameworks can treat code as a black box (for example, a GUI tester), unit tests are usually written using the same language as the system they are testing.

  2. The day-to-day development of a system should include the writing of unit tests. For the audience of this book, unit tests should be the most familiar type.

  3. It is the nature of most scientific and engineering code that a large amount of computation can occur before a comparatively simple, yet previously unknown, answer is produced. Unit testing is the type of testing that is most directly focused on the question, "Is that the right answer?"

    Note

    For ease of reference, we will refer to the part of the program being tested as "code", and the part of the program...