[New-bugs-announce] [issue44923] Unittest incorrect result with argparse.ArgumentError in self asserRaises context

Troulet-lambert Odile report at bugs.python.org
Mon Aug 16 05:52:33 EDT 2021


New submission from Troulet-lambert Odile <piscvau at yahoo.fr>:

When passed an Argparse.ArgumentError in the self.assertRaises context uniittest does not recognize the exception and raises an exception.
As a consequence the test fails whereas it should pass

----------
components: Tests
files: bug_unittest_exception.py
messages: 399640
nosy: piscvau
priority: normal
severity: normal
status: open
title: Unittest incorrect result with argparse.ArgumentError in self asserRaises context
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file50222/bug_unittest_exception.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44923>
_______________________________________


More information about the New-bugs-announce mailing list