[issue44923] Unittest incorrect result with argparse.ArgumentError in self asserRaises context

2021-08-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44923] Unittest incorrect result with argparse.ArgumentError in self asserRaises context

2021-08-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You raise ArgumentTypeError, but expect ArgumentError. ArgumentTypeError is not a subclass of ArgumentError. -- nosy: +serhiy.storchaka versions: +Python 3.8 -Python 3.6 ___ Python tracker

[issue44923] Unittest incorrect result with argparse.ArgumentError in self asserRaises context

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: What is the output of the failed test? -- nosy: +iritkatriel versions: +Python 3.6 -Python 3.8 ___ Python tracker ___

[issue44923] Unittest incorrect result with argparse.ArgumentError in self asserRaises context

2021-08-16 Thread Troulet-lambert Odile
New submission from Troulet-lambert Odile : 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: