Module blindai.testing

Functions

def start_mock_server() ‑> MockServer

Start BlindAI mock server for testing. The method will download BlindAI Preview's mock server binary if needed. The mock server is then started allowing to run the rest of your Google Colab/Jupyter Notebook environment.

Args

None

Return

MockServer object, the process of the running server.

Raises

NotFoundError
Will be raised if one of the URL the wheel will try to access is invalid. This might mean that either there is no available binary of BlindAI's server.

Other exceptions might be raised by zipfile or urllib.request.

Classes

class MockServer (process)

Mock server process handle

Methods

def stop(self) ‑> bool

Stop BlindAI mock server.

This method will kill the running server, if the provided MockServer is still running.

Args

self : MockServer
Mock server process handle

Return

bool, True if the server was successfully stopped.

Raises

None

class NotFoundError (message)

This exception is raised when there was an error opening an URL.

Args

Args:
message : str
Error message.

Ancestors

  • builtins.Exception
  • builtins.BaseException