Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_model(model_name, caplog):
"""kipoi test ...
"""
caplog.set_level(logging.INFO)
source_name = "kipoi"
assert source_name == "kipoi"
env_name = conda_env_name(model_name, model_name, source_name)
env_name = "test-" + env_name # prepend "test-"
# if environment already exists, remove it
if env_exists(env_name):
print("Removing the environment: {0}".format(env_name))
remove_env(env_name)
# create the model test environment
args = ["kipoi", "env", "create",
"--source", source_name,
"--env", env_name,
model_name]
returncode = subprocess.call(args=args)
assert returncode == 0
if model_name == "basenji":