schrodinger.test.pytest.fixture module

Features that a developer might use when writing tests.

schrodinger.test.pytest.fixture.unittest_preset_manager()[source]

A fixture that mocks out the PresetManager with a PresetManager that uses the current working directory as the presets directory. This prevents reliance on system state.

schrodinger.test.pytest.fixture.json_version()[source]

A fixture that mocks out the version used by schrodinger.models.json.JsonableClassMixin. By default, the version returned will be the current mmshare version. The return_value of the fixture can be adjusted to change the version. Example:

def my_test(json_version):
    from schrodinger.models import json
    from schrodinger import get_mmshare_version
    foo = json.JsonableClassMixin()
    assert foo.get_version() == get_mmshare_version()
    json_version.return_value = 10
    assert foo.get_version() == 10
schrodinger.test.pytest.fixture.tmp_cwd(tmpdir_factory, request, monkeypatch)[source]
schrodinger.test.pytest.fixture.allow_memtest(request)[source]
schrodinger.test.pytest.fixture.fast_jobdj()[source]

Use this fixture to make jobDJ use minimal delays in updating, at the expense of throttling the CPU.

schrodinger.test.pytest.fixture.mock_gpgpu_hosts_env()[source]