title: Unit testing for exceptions in Python constructor
body: <p>I'm just a beginner in Python and programming in general, and have some questions about the unittest module. </p>
  
  <p>I have a class, and in the <code>__init__</code> method I am doing some assertions to check for bad arguments. I would like to create a unittest which checks for such AssertionError when creating new instances. </p>
  
  <p>In the unittest module, one can test (with <code>assertRaises</code>) for specific exception when a callable is called, but obviously that will apply to methods of the class. What is the proper way to run such test for the constructor?</p>
  
  <p>I know that I can just try to create an instance of the class with bad arguments, and unittest will report a test failure, but that stops immediately after the first such exception, and even if I can wrap multiple tests in multiple test functions, it just doesn't seem elegant at all.</p>