import os
import sys
import argparse

from coalib.tests.TestHelper import TestHelper


def show_help():
    print("Usage: {name} [OPTIONS]".format(name=sys.argv[0]))
    print()
    print("--help  : Show this help text")
    print("--cover : Use coverage to get statement and branch coverage of tests")


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument("-c", "--cover", help="measure code coverage", action="store_true")
    args = parser.parse_args()

    files = TestHelper.get_test_files(os.path.abspath("coalib/tests"))
    exit(TestHelper.execute_python3_files(files, args.cover))

import os
import sys
import argparse

from coalib.tests.TestHelper import TestHelper


def show_help():
    print("Usage: {name} [OPTIONS]".format(name=sys.argv[0]))
    print()
    print("--help  : Show this help text")
    print("--cover : Use coverage to get statement and branch coverage of tests")


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument("-c", "--cover", help="measure code coverage", action="store_true")
    parser.add_argument("-b", "--ignore-bear-tests", help="ignore bear tests", action="store_true")
    parser.add_argument("-m", "--ignore-main-tests", help="ignore main program tests", action="store_true")
    args = parser.parse_args()

    files = []
    if not args.ignore_main_tests:
        files.extend(TestHelper.get_test_files(os.path.abspath("coalib/tests")))
    if not args.ignore_bear_tests:
        files.extend(TestHelper.get_test_files(os.path.abspath("bears/tests")))

    exit(TestHelper.execute_python3_files(files, args.cover))

Test execution: Add bear tests
Test execution: Add bear tests

  import os
  import sys
  import argparse
  
  from coalib.tests.TestHelper import TestHelper
  
  
  def show_help():
      print("Usage: {name} [OPTIONS]".format(name=sys.argv[0]))
      print()
      print("--help  : Show this help text")
      print("--cover : Use coverage to get statement and branch coverage of tests")
  
  
  if __name__ == '__main__':
      parser = argparse.ArgumentParser()
      parser.add_argument("-c", "--cover", help="measure code coverage", action="store_true")
+     parser.add_argument("-b", "--ignore-bear-tests", help="ignore bear tests", action="store_true")
+     parser.add_argument("-m", "--ignore-main-tests", help="ignore main program tests", action="store_true")
      args = parser.parse_args()
  
+     files = []
+     if not args.ignore_main_tests:
-     files = TestHelper.get_test_files(os.path.abspath("coalib/tests"))
+         files.extend(TestHelper.get_test_files(os.path.abspath("coalib/tests")))
+     if not args.ignore_bear_tests:
+         files.extend(TestHelper.get_test_files(os.path.abspath("bears/tests")))
+ 
      exit(TestHelper.execute_python3_files(files, args.cover))
  
Test execution: Add bear tests
## Code Before:
import os
import sys
import argparse

from coalib.tests.TestHelper import TestHelper


def show_help():
    print("Usage: {name} [OPTIONS]".format(name=sys.argv[0]))
    print()
    print("--help  : Show this help text")
    print("--cover : Use coverage to get statement and branch coverage of tests")


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument("-c", "--cover", help="measure code coverage", action="store_true")
    args = parser.parse_args()

    files = TestHelper.get_test_files(os.path.abspath("coalib/tests"))
    exit(TestHelper.execute_python3_files(files, args.cover))

## Instruction:
Test execution: Add bear tests
## Code After:
import os
import sys
import argparse

from coalib.tests.TestHelper import TestHelper


def show_help():
    print("Usage: {name} [OPTIONS]".format(name=sys.argv[0]))
    print()
    print("--help  : Show this help text")
    print("--cover : Use coverage to get statement and branch coverage of tests")


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument("-c", "--cover", help="measure code coverage", action="store_true")
    parser.add_argument("-b", "--ignore-bear-tests", help="ignore bear tests", action="store_true")
    parser.add_argument("-m", "--ignore-main-tests", help="ignore main program tests", action="store_true")
    args = parser.parse_args()

    files = []
    if not args.ignore_main_tests:
        files.extend(TestHelper.get_test_files(os.path.abspath("coalib/tests")))
    if not args.ignore_bear_tests:
        files.extend(TestHelper.get_test_files(os.path.abspath("bears/tests")))

    exit(TestHelper.execute_python3_files(files, args.cover))
