[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

[issue38763] mock with side effect : assert_called_once returns None while call_count returns 1

2019-11-10 Thread Troulet-lambert Odile
New submission from Troulet-lambert Odile : Using a mock with side_effect, I would expect that assert_called_once returns True if the mock has been called. Yet it returns None while call_count== 1 returns True. If this is not a bug, I would welcome some explanation in the documentation

[issue38757] mocking an exception, arguments do not seem to be passed to the mock

2019-11-09 Thread Troulet-lambert Odile
New submission from Troulet-lambert Odile : When patching an Exception with a side_effect to another exception, it seems like the exceiption arguments are not passed to the mock. -- components: Tests files: essai mock_exception.py messages: 356305 nosy: piscvau priority: normal