LoslegenKostenlos loslegen

Writing some basic tests

If you have written a full suite of tests for your code, it means you can develop and modify it more freely. If you make some changes that break your code, you'll be able to find this out right away. It also signals to users that your code is more likely to be error free, and can be trusted to do its job.

The tests you write will check that your functions give the expected outputs for given inputs. In this case you will be writing numeric tests to make sure that the correct answer is returned when converting a number of inches to feet and vice versa.

In this exercise, you'll write a test for one of your functions inside impyrial.

Diese Übung ist Teil des Kurses

Developing Python Packages

Kurs anzeigen

Interaktive Übung

In dieser interaktiven Übung kannst du die Theorie in die Praxis umsetzen.

Übung starten