6

Unit Testing

Unit testing is a critical part of a data engineering workflow. It allows the data engineer to test individual units in their code. A unit is any independent piece of code and can be functions, modules, or classes. They will test each unit in isolation to ensure the intended output is returned and functions properly.

Unit testing allows the data engineer to find and fix potential bugs earlier in the development process and also protects their code from breaking when changes are done or their code becomes more complex. It is also more efficient than manual testing.

In this chapter, we will cover fundamental-to-intermediate unit testing concepts in Python you should know for an interview.

In this chapter, we will cover the following ...

Get Cracking the Data Engineering Interview now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.