Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content

Resolve "e2e tests bec client is shared between client and server"

Description

Summary of proposed changes:

  • use of pytest-xvfb, if xvfb is installed on the host, GUI will not popup except if --no-xvfb is passed when launching tests
  • use of float() for rounding, to accept both scalars and numpy arrays of 1 element (more robust - indeed it seems like with future changes in Ophyd, when the type of data is specified, in case of shape=() it can return a numpy array of 1 element == a scalar
  • the threads_check fixture is made autouse=True, to ensure it is executed at the end
  • 2 processes are spawned for rpc_server_dock, rpc_server_figure fixtures, to mimic reality
    • tests have been adapted accordingly
    • in particular: .get_docks_repr() method as been added, to get a description of the docks with tempArea etc, so we can test content from the server in the client ; it goes down to calling str() on widgets, which provides an opportunity for those to return something useful for tests. The Spiral widget returns ring values etc to be able to test from client
    • in the same vein, for RPC register tests: the test gets connections from the server and test against class names instead of instances since instances are different in server and client ; more precise tests can be done as unit tests if needed
    • simulation motors tolerance is set to 0, where comparison with positions is made, in order to simplify tests (since now we test against strings...). Otherwise it would need to extract floats from server returned string and test with pytest.approx or numpy.testing.allclose with axis tolerance but this is overkill for those GUI tests

Closes #192 (closed)

Edited by guijar_m

Merge request reports

Loading