fixtures

Collection of pytest fixtures used in conda tests.

Functions

suppress_resource_warning()

Suppress Unclosed Socket Warning

tmpdir(tmpdir, request)

clear_subdir_cache()

disable_channel_notices()

Fixture that will set "context.number_channel_notices" to 0 and then set

reset_conda_context()

Resets the context object after each test function is run.

temp_package_cache(tmp_path_factory)

Used to isolate package or index cache from other tests.

suppress_resource_warning()

Suppress Unclosed Socket Warning

It seems urllib3 keeps a socket open to avoid costly recreation costs.

xref: https://github.com/kennethreitz/requests/issues/1882

tmpdir(tmpdir, request)
clear_subdir_cache()
disable_channel_notices()

Fixture that will set "context.number_channel_notices" to 0 and then set it back to its original value.

This is also a good example of how to override values in the context object.

reset_conda_context()

Resets the context object after each test function is run.

temp_package_cache(tmp_path_factory)

Used to isolate package or index cache from other tests.