title: Python - How to mask a class from being executed in unittest on runtime
body: <p>Please see the code below. I was trying to implement a test suite for my project</p>
  
  <pre><code>import unittest
  class TestClass1(unittest.TestCase):
      def test_1_first(self):
          print("First test case")
  
      def test_2_second(self):
          print("Second test case")
  
  class TestClass2(unittest.TestCase):
      def test_3_third(self):
          print("Third test case")
  
      def test_4_fourth(self):
          print("Fourth test case")
  
  if __name__ == "__main__":
      # val = 1        &lt;-- getting from user
      # if val == 1:
      #    Execute test cases in TestClass2
      # else
      #    Execute test cases in TestClass1\
      unittest.main()
  </code></pre>
  
  <p>I will get the class name as <em>command line argument</em> and I need to run each class of test according to the argument. Means I need to select and run some classes of test cases on runtime. <strong>So can any one help me to prevent a class from unit test execution at runtime</strong>? The problem is It's not allowed to use the method like passing class name while execution</p>