Back to Catalog

Unit Testing Python Code Using Nose

IntermediateGuided Project

Nose is a Python testing framework that simplifies writing and running tests for your code. In this hands-on guided project, you will learn how to use Nose to run automated unit tests in Python.

4.5 (25 Reviews)

Language

  • English

Topic

  • Cloud Development

Enrollment Count

  • 89

Skills You Will Learn

  • Python, nose

Offered By

  • IBMSkillsNetwork

Estimated Effort

  • 30 minutes

Platform

  • SkillsNetwork

Last Update

  • May 8, 2024
About This Guided Project
Companies large and small use Nose to run automated tests for Python applications and improve the quality and reliability of their software. Perfect for teams who follow the practices of Test Driven Development (TDD) or Behavior Driven Development (BDD), Nose’s simple and intuitive API makes this automation framework a valuable tool for Python developers and testers.

In this hands-on guided project, you will learn how to run unit tests using Python’s unittest package and Nose. You’ll also learn how to use Pinocchio to customize the colors of your output and add coverage reports. Finally, you will create a configuration file with Nose, allowing you to automate these processes in the future.

After completing this project, you will be prepared to work with Nose in your own Python projects to run automated unit tests.

A Look at the Project Ahead

After completing this project, you'll be able to:
  • Install Nose, Pinocchio, and Coverage
  • Run unit tests with unittest and Nose
  • Produce color-coded test output
  • Add coverage reports to your test output

What You'll Need

For this project, you will need:
  • Basic Python skills
  • Basic knowledge of Test Driven Development

You’ll have access to a Cloud-based IDE that includes all of the required software, including a Python environment, preinstalled. All you need is a recent version of a modern web browser to complete this project. 

Instructors

John Rofrano

Senior Technical Staff Member | DevOps Champion

John J. Rofrano is a Senior Technical Staff Member and DevOps Champion at IBM T.J. Watson Research Center where he leads a variety of research projects exploring the use of AI for accelerating Application Modernization to the Cloud. He is also an Adjunct Faculty Member at New York University Courant Institute, and Stern School of Business @ NYU, where he teaches a graduate course on DevOps and Agile Methodologies. John is an accomplished musician and videographer, and has authored numerous patents, industry papers, training videos, and books.

Read more