From the course: Managing Python Projects

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Tests

Tests - Python Tutorial

From the course: Managing Python Projects

Start my 1-month free trial

Tests

- [Instructor] In 2010, GitHub suffered a severe outage. The cause was tests accidentally running in production, deleting the main database. Many companies learn this lesson the hard way. Do all you can to make sure tests don't run in production, including placing them in a separate directory. In our case, this directory is called tests, because both test and testing are built-in models. We'll talk about testing in-depth in another episode, but you should have tests. Apart from yourself in it when making changes and validating your code, they also send a signal to potential users that you're serious about your code. Tests can also serve as the commentation. By reading test code, people will be able to understand how to use your package. The tests directory mostly contains Python files, but it can also contain some auxiliary data.

Contents