コード例 #1
0
 def setUpClass(cls):
     '''
     If in full stack mode, configures and starts the arkouda_server process and sets the 
     ArkoudaTest.server class attribute, noop in client mode.
     
     :return: None
     :raise: EnvironmentError if 1..n required test libraries are missing, RuntimeError 
             if there is an error in configuring or starting arkouda_server
     '''
     if not importlib.util.find_spec(
             'pytest') or not importlib.util.find_spec('pytest_env'):
         raise EnvironmentError('pytest and pytest-env must be installed')
     if ArkoudaTest.full_stack_mode:
         print('starting in full stack mode')
         try:
             nl = get_arkouda_numlocales()
             ArkoudaTest.server, _, _ = start_arkouda_server(
                 numlocales=nl, port=ArkoudaTest.port)
             print('Started arkouda_server in full stack test mode with host: {} port: {} locales: {}'.\
                   format(ArkoudaTest.server, ArkoudaTest.port, nl))
         except Exception as e:
             raise RuntimeError(
                 'in configuring or starting the arkouda_server: {}, check '
                 + 'environment and/or arkouda_server installation', e)
     else:
         print('in client stack test mode with host: {} port: {}'.format(
             ArkoudaTest.server, ArkoudaTest.port))
コード例 #2
0
 def test_shutdown(self):
     '''
     Tests the ak.shutdown() method
     '''
     ak.shutdown()
     start_arkouda_server(numlocales=1)