
import os
import re
import unittest

_TEST_MODULE_PATTERN = re.compile(r'^(t_.+)\.py$')

def _run_all_tests():
    module_names = []
    loader = unittest.TestLoader()
    test_path = os.path.join(os.path.split(__file__)[0], '.')

    for filename in os.listdir(test_path):
        match = _TEST_MODULE_PATTERN.search(filename)
        if match:
            case = match.group(1)
            if case != 't_expire' and case != 't_multi':
                module_names.append(case)

    return loader.loadTestsFromNames(module_names)

def ExpireTestCase():
    loader = unittest.TestLoader()
    return loader.loadTestsFromName('t_expire')

if __name__ == '__main__':
    unittest.main(defaultTest='_run_all_tests')


import os
import re
import unittest

_TEST_MODULE_PATTERN = re.compile(r'^(t_.+)\.py$')

def _run_all_tests():
    module_names = []
    loader = unittest.TestLoader()
    test_path = os.path.join(os.path.split(__file__)[0], '.')

    for filename in os.listdir(test_path):
        match = _TEST_MODULE_PATTERN.search(filename)
        if match:
            case = match.group(1)
            if case not in ('t_expire', 't_multi', 't_script'):
                module_names.append(case)

    return loader.loadTestsFromNames(module_names)

def ExpireTestCase():
    loader = unittest.TestLoader()
    return loader.loadTestsFromName('t_expire')

def MultiTestCase():
    loader = unittest.TestLoader()
    return loader.loadTestsFromName('t_multi')

def ScriptTestCase():
    loader = unittest.TestLoader()
    return loader.loadTestsFromName('t_script')

if __name__ == '__main__':
    unittest.main(defaultTest='_run_all_tests')

Exclude the play script test case from the default test suite.
Exclude the play script test case from the default test suite.

  
  import os
  import re
  import unittest
  
  _TEST_MODULE_PATTERN = re.compile(r'^(t_.+)\.py$')
  
  def _run_all_tests():
      module_names = []
      loader = unittest.TestLoader()
      test_path = os.path.join(os.path.split(__file__)[0], '.')
  
      for filename in os.listdir(test_path):
          match = _TEST_MODULE_PATTERN.search(filename)
          if match:
              case = match.group(1)
-             if case != 't_expire' and case != 't_multi':
+             if case not in ('t_expire', 't_multi', 't_script'):
                  module_names.append(case)
  
      return loader.loadTestsFromNames(module_names)
  
  def ExpireTestCase():
      loader = unittest.TestLoader()
      return loader.loadTestsFromName('t_expire')
  
+ def MultiTestCase():
+     loader = unittest.TestLoader()
+     return loader.loadTestsFromName('t_multi')
+ 
+ def ScriptTestCase():
+     loader = unittest.TestLoader()
+     return loader.loadTestsFromName('t_script')
+ 
  if __name__ == '__main__':
      unittest.main(defaultTest='_run_all_tests')
  
Exclude the play script test case from the default test suite.
## Code Before:

import os
import re
import unittest

_TEST_MODULE_PATTERN = re.compile(r'^(t_.+)\.py$')

def _run_all_tests():
    module_names = []
    loader = unittest.TestLoader()
    test_path = os.path.join(os.path.split(__file__)[0], '.')

    for filename in os.listdir(test_path):
        match = _TEST_MODULE_PATTERN.search(filename)
        if match:
            case = match.group(1)
            if case != 't_expire' and case != 't_multi':
                module_names.append(case)

    return loader.loadTestsFromNames(module_names)

def ExpireTestCase():
    loader = unittest.TestLoader()
    return loader.loadTestsFromName('t_expire')

if __name__ == '__main__':
    unittest.main(defaultTest='_run_all_tests')

## Instruction:
Exclude the play script test case from the default test suite.
## Code After:

import os
import re
import unittest

_TEST_MODULE_PATTERN = re.compile(r'^(t_.+)\.py$')

def _run_all_tests():
    module_names = []
    loader = unittest.TestLoader()
    test_path = os.path.join(os.path.split(__file__)[0], '.')

    for filename in os.listdir(test_path):
        match = _TEST_MODULE_PATTERN.search(filename)
        if match:
            case = match.group(1)
            if case not in ('t_expire', 't_multi', 't_script'):
                module_names.append(case)

    return loader.loadTestsFromNames(module_names)

def ExpireTestCase():
    loader = unittest.TestLoader()
    return loader.loadTestsFromName('t_expire')

def MultiTestCase():
    loader = unittest.TestLoader()
    return loader.loadTestsFromName('t_multi')

def ScriptTestCase():
    loader = unittest.TestLoader()
    return loader.loadTestsFromName('t_script')

if __name__ == '__main__':
    unittest.main(defaultTest='_run_all_tests')
