Exemplo n.º 1
0
 def verify_bad_samples(self, cmd, mock_setup_logging):
     with mock.patch(
         "stdpopsim.cli.exit", side_effect=ExceptionForTesting, autospec=True
     ) as mocked_exit:
         with pytest.raises(ExceptionForTesting):
             cli.stdpopsim_main(cmd.split())
         mocked_exit.assert_called_once()
Exemplo n.º 2
0
 def verify_bad_samples(self, cmd, mock_setup_logging):
     with mock.patch("stdpopsim.cli.exit",
                     side_effect=TestException) as mocked_exit:
         with self.assertRaises(TestException):
             cli.stdpopsim_main(cmd.split())
         mocked_exit.assert_called_once()