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