schrodinger.test.fixtures module

Test fixtures

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.test.fixtures.in_tmp_dir(tmpdir)

Change the working directory to the temporary test directory for the length of the unit test.

schrodinger.test.fixtures.use_static_opls_directory()

Sets OPLS_DIR to static data directory used in testing

class schrodinger.test.fixtures.safe_patch_os_environ(values: Optional[dict] = None)

Bases: contextlib.ContextDecorator

Patch os.environ without clearing it to avoid crashes in threads

Doesn’t overwrite environment variables that are expected/allowed to change under pytest.

__init__(values: Optional[dict] = None)
start()
stop()