the preferred way is to use @unittest.skipIf as a decorator on the test method to skip the test.