comparison NewTests/main.py @ 483:45c3fe035fed

added tests for delayed_deletion
author Alain Mazy <am@osimis.io>
date Wed, 22 Jun 2022 15:45:31 +0200
parents 73d41c681568
children
comparison
equal deleted inserted replaced
482:535e651e70a2 483:45c3fe035fed
26 parser.add_argument('--orthanc_previous_version_exe', type=str, default=None, help="path to the orthanc executable used to prepare previous version of storage/db (if it must be launched by this script and if different from orthanc_under_tests_exe)") 26 parser.add_argument('--orthanc_previous_version_exe', type=str, default=None, help="path to the orthanc executable used to prepare previous version of storage/db (if it must be launched by this script and if different from orthanc_under_tests_exe)")
27 parser.add_argument('--orthanc_under_tests_docker_image', type=str, default=None, help="Docker image of the orthanc under tests (if it must be launched by this script)") 27 parser.add_argument('--orthanc_under_tests_docker_image', type=str, default=None, help="Docker image of the orthanc under tests (if it must be launched by this script)")
28 parser.add_argument('--orthanc_previous_version_docker_image', type=str, default=None, help="Docker image of the orthanc version used to prepare previous version of storage/db (if it must be launched by this script)") 28 parser.add_argument('--orthanc_previous_version_docker_image', type=str, default=None, help="Docker image of the orthanc version used to prepare previous version of storage/db (if it must be launched by this script)")
29 parser.add_argument('--skip_preparation', action='store_true', help="if this is a multi stage tests with preparations, skip the preparation") 29 parser.add_argument('--skip_preparation', action='store_true', help="if this is a multi stage tests with preparations, skip the preparation")
30 parser.add_argument('--break_after_preparation', action='store_true', help="if this is a multi stage tests with preparations, pause after the preparation (such that you can start your own orthanc-under-tests in your debugger)") 30 parser.add_argument('--break_after_preparation', action='store_true', help="if this is a multi stage tests with preparations, pause after the preparation (such that you can start your own orthanc-under-tests in your debugger)")
31 parser.add_argument('--break_before_preparation', action='store_true', help="if this is a multi stage tests with preparations, pause before the preparation (such that you can start your own orthanc-under-tests in your debugger)")
31 parser.add_argument('-p', '--plugin', dest='plugins', action='append', type=str, help='path to a plugin to add to configuration') 32 parser.add_argument('-p', '--plugin', dest='plugins', action='append', type=str, help='path to a plugin to add to configuration')
32
33 33
34 args = parser.parse_args() 34 args = parser.parse_args()
35 35
36 loader = unittest.TestLoader() 36 loader = unittest.TestLoader()
37 loader.testNamePatterns = args.test_name_patterns 37 loader.testNamePatterns = args.test_name_patterns
56 56
57 if args.skip_preparation: 57 if args.skip_preparation:
58 Helpers.skip_preparation = True 58 Helpers.skip_preparation = True
59 if args.break_after_preparation: 59 if args.break_after_preparation:
60 Helpers.break_after_preparation = True 60 Helpers.break_after_preparation = True
61 if args.break_before_preparation:
62 Helpers.break_before_preparation = True
61 63
62 print("Launching tests") 64 print("Launching tests")
63 65
64 result = unittest.TextTestRunner(verbosity=2).run(load_tests(loader=loader)) 66 result = unittest.TextTestRunner(verbosity=2).run(load_tests(loader=loader))
65 if not result.wasSuccessful(): 67 if not result.wasSuccessful():