# Using Python unittest subTest to identify failing values

DevFeed: [Using Python unittest subTest to identify failing values](<https://devfeed.tech/articles/the-best-new-feature-in-unittest-you-didn-t-know-you-need-33941.md>)

Original publisher: [Read original article](<https://hakibenita.com/the-best-new-feature-in-unittest-you-didnt-know-you-need>)

Author: Haki Benita

Published: 2016-12-01T22:00:00Z

Content type: tutorial

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [test](<https://devfeed.tech/topics/test.md>), [function](<https://devfeed.tech/topics/function.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [new-feature](<https://devfeed.tech/tags/new-feature.md>), [python](<https://devfeed.tech/tags/python.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

This tutorial demonstrates Python's unittest subTest feature. It shows how subTest identifies the specific value that caused a test failure when testing multiple values in a loop, including the failing value 11.

## Source excerpt

From time to time I like to read documentation of modules I think I know well. The python documentation is not a pleasant read but sometimes you strike a gem.