Mercurial > hg > orthanc-tests
comparison Tests/Tests.py @ 231:4087505ddfe3
catching error codes of movescu
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 05 Mar 2019 07:02:26 +0100 |
parents | 7b1c976caa9b |
children | ce0b19a2c807 |
comparison
equal
deleted
inserted
replaced
230:7dc50b474bd4 | 231:4087505ddfe3 |
---|---|
100 '--aetitle', _LOCAL['DicomAet'], # Calling AET (i.e. storescp) | 100 '--aetitle', _LOCAL['DicomAet'], # Calling AET (i.e. storescp) |
101 _REMOTE['Server'], | 101 _REMOTE['Server'], |
102 str(_REMOTE['DicomPort']) | 102 str(_REMOTE['DicomPort']) |
103 ] | 103 ] |
104 | 104 |
105 | |
105 def CallMoveScu(args): | 106 def CallMoveScu(args): |
106 subprocess.check_call(GetMoveScuCommand() + args, | 107 try: |
107 stderr=subprocess.PIPE) | 108 subprocess.check_call(GetMoveScuCommand() + args, |
108 | 109 stderr=subprocess.PIPE) |
110 except subprocess.CalledProcessError as e: | |
111 # The error code "69" corresponds to "EXITCODE_CMOVE_ERROR", | |
112 # that has been introduced in DCMTK 3.6.2. This error code is | |
113 # expected by some tests that try and C-MOVE non-existing | |
114 # DICOM instances. | |
115 # https://groups.google.com/d/msg/orthanc-users/DCRc5NeSCbM/DG-pSWj-BwAJ | |
116 if e.returncode != 69: | |
117 raise e | |
109 | 118 |
110 | 119 |
111 def GenerateTestSequence(): | 120 def GenerateTestSequence(): |
112 return [ | 121 return [ |
113 { | 122 { |