コード例 #1
0
 def check_and_raise():
     x = Interface(config='.xnat.cfg')
     try:
         x.head('')
         print('Docker instance found.')
     except ConnectionError:
         print('Skipping it.')
         raise SkipTest('Docker-based XNAT instance unavailable')
コード例 #2
0
 def check_and_raise():
     x = Interface(config='.xnat.cfg')
     try:
         x.head('')
         list(x.select.projects())
         print('Docker instance found.')
     except (ConnectionError, KeyError):
         print('Skipping it.')
         raise SkipTest('Docker-based XNAT instance unavailable')