ComeçarComece de graça

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.

Este exercício faz parte do curso

Developing Python Packages

Ver curso

Exercício interativo prático

Transforme a teoria em ação com um de nossos exercícios interativos

Começar o exercício