safe_unload_package: Safely unload a package to avoid coverage conflicts

View source: R/run_covr_modes.R

safe_unload_packageR Documentation

Safely unload a package to avoid coverage conflicts

Description

This internal function attempts to unload a specified package if it is currently loaded. It is used to prevent coverage conflicts when reloading the package in a custom environment.

Usage

safe_unload_package(pkg)

Arguments

pkg

Character string. The name of the package to unload.

Value

NULL (invisibly). Messages are printed to indicate success or failure.


test.assessr documentation built on March 3, 2026, 1:06 a.m.