schrodinger.seam.testing.fixtures module

schrodinger.seam.testing.fixtures.track_leaked_loghandlers()

Context manager that tracks loghandlers that are leaked during the yield. Yields a dict of leaked loggers to leaked handlers.

schrodinger.seam.testing.fixtures.mock_job_backend()

Mock for simulating being in a job backend context.

Example usage:

def test_foo(mock_job_backend):

# Set up the mock mock_job_backend.setJobID(‘1234’) mock_job_backend.setJobName(‘MySeamJob’) mock_job_backend.setHostEntry(‘DRIVERQUEUE’) mock_job_backend.setSubhost((“SUBHOST”, 12))

# Do things that require being in a job backend context from schrodinger.job import jobcontrol jobcontrol.get_backend().job_id == ‘1234’ jobcontrol.get_backend().getJob().JobID == ‘1234’ jobcontrol.get_backend().getJob().Name == ‘MySeamJob’ jobcontrol.get_backend().getJob().HostEntry == ‘DRIVERQUEUE’ jobcontrol.get_backend_host_list() == [(“SUBHOST”, 12)]

schrodinger.seam.testing.fixtures.visualize_pipelines(request)
schrodinger.seam.testing.fixtures.without_trial_fleet()
schrodinger.seam.testing.fixtures.fixed_bundle_size_999()
schrodinger.seam.testing.fixtures.mock_trial_fleet_task_type()

Fixture for mocking the task type used by the trial fleet. Requires function scope to properly patch the module-level variable.

schrodinger.seam.testing.fixtures.mock_license_manager(license_requirements=None, err_msg_hint=None)

Context manager that ensures only licenses specified in license_requirements can be checked in/out.

This only checks licenses that are checked out using schrodinger.utils.license.License. If licenses are checked out with C++ code or in a separate subprocess, this fixture won’t catch it.

schrodinger.seam.testing.fixtures.check_directrunner_license_checkouts()
schrodinger.seam.testing.fixtures.no_debug_flags_from_env()
schrodinger.seam.testing.fixtures.check_directrunner_license_checkouts_impl()
class schrodinger.seam.testing.fixtures.TaskWithLicenseManager(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.seam.runners._tasks.StageExecutionWorkerTask

mainFunction()
calling_contextChanged

A pyqtSignal emitted by instances of the class.

calling_contextReplaced

A pyqtSignal emitted by instances of the class.

failure_infoChanged

A pyqtSignal emitted by instances of the class.

failure_infoReplaced

A pyqtSignal emitted by instances of the class.

input: schrodinger.seam.runners._tasks._AbstractStageExecutionWorkerTask.Input

A parameter of the class.

inputChanged

A pyqtSignal emitted by instances of the class.

inputReplaced

A pyqtSignal emitted by instances of the class.

max_progressChanged

A pyqtSignal emitted by instances of the class.

max_progressReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

output: schrodinger.seam.runners._tasks._AbstractStageExecutionWorkerTask.Output

A parameter of the class.

outputChanged

A pyqtSignal emitted by instances of the class.

outputReplaced

A pyqtSignal emitted by instances of the class.

progressChanged

A pyqtSignal emitted by instances of the class.

progressReplaced

A pyqtSignal emitted by instances of the class.

progress_stringChanged

A pyqtSignal emitted by instances of the class.

progress_stringReplaced

A pyqtSignal emitted by instances of the class.

statusChanged

A pyqtSignal emitted by instances of the class.

statusReplaced

A pyqtSignal emitted by instances of the class.

schrodinger.seam.testing.fixtures.check_seamrunner_license_checkouts()

This fixture asserts that any beam transform that checks out a license marks the license as required.

schrodinger.seam.testing.fixtures.check_seamrunner_license_checkouts_impl()
schrodinger.seam.testing.fixtures.no_debug_flags_from_env_impl()
schrodinger.seam.testing.fixtures.clean_beam_traceback()
schrodinger.seam.testing.fixtures.clean_beam_traceback_impl(fixture_name: str)
schrodinger.seam.testing.fixtures.disallow_grpc_workers()