Automated code testing

Do you lack of confidence in what your code is doing? Are you afraid to use or modify an old group/lab's code? How to ensure that your own code works as excepted?

Debugging is one the of most time consuming tasks for developers and software engineers. The code is not always working as expected and even with minor modifications, a complex or unknown code can easily be broken. Fortunately there exist approaches helping to detect bugs before a production run, or to ensure that future modifications will not break already existing features.

This workshop will show several approach to automatically test your code and what are the best practices when you're involved in any development project. What we'll show you apply whenever your working on a personal project or on a collaborative one. During the workshop you'll learn to write automatic tests for a small Python project.


You should be able write scripts and small programs. As Python 3 will be used during the workshop, knowledge in Python is recommended.

Basic skills in command line are expected. If you're not familiar, you should consider attending our command line workshop.

Material needed

Participants should come with their personal computer and should be connected to the University of Geneva's WiFi. Rooms may be equipped with Desktop computers with virtual desktop infrastructure but this depends on rooms availability at the time of the workshop.

We recommend that you already install a Python interpreter on your machine:

  • Windows users can install dedicated Python 3 relases, you can download it here.
  • Linux users should refer to their distribution's package manager (e.g. apt install python3 for Ubuntu based distribution).
  • Mac OS users can follow this tutorial to install Python 3.

As we will use pytest it's also recommanded to install it. We suggest Pipenv but you can use any Python package install tool.


Registration to workshop is mandatory. Date, location and availability depend on the session. The registration forms can be found on the scicos events Indico website. Please note that the number of participants is limited to ensure proper students supervision.