Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixtures: Add aiida_computer_localhost and aiida_computer_ssh #5786

Merged
merged 2 commits into from
Nov 24, 2022

Commits on Nov 23, 2022

  1. Computer: Add the is_configured property

    This is a convenience property that calls `is_user_configured` but
    automatically passed the current default user.
    sphuber committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    6a155b5 View commit details
    Browse the repository at this point in the history
  2. Fixtures: Add aiida_computer_local and aiida_computer_ssh

    These fixtures return an instance of `Computer` that represents the
    localhost computer with `core.local` and `core.ssh` as the transport
    type, respectively. By default, the computers are also configured. The
    `aiida_computer_ssh` will even create an SSH key pair automatically for
    the session such that the SSH transport can actually be opened.
    
    The fixtures both call the more generic `aiida_computer` which returns a
    factory that gives greater control on how the computer is created and
    configured. Usuallly the two wrappers are all that is needed for the
    majority of tests.
    
    The fixtures are placed in `pytest_fixtures` instead of the `conftest.py`
    of `aiida-core`, because `aiida_computer` and `aiida_computer_local`
    should be available to plugins. The `aiida_computer_ssh` is probably
    mostly useful for tests in `aiida-core`, but for clarity it is kept
    together with `aiida_computer_local`.
    
    The existing fixture `aiida_localhost` now simply uses the
    `aiida_computer_local` fixture as the implementation.
    sphuber committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    5d3c55a View commit details
    Browse the repository at this point in the history