(
tmp_env: TmpEnvFixture,
monkeypatch: MonkeyPatch,
conda_cli: CondaCLIFixture,
)
| 288 | |
| 289 | |
| 290 | def test_safety_checks_warn( |
| 291 | tmp_env: TmpEnvFixture, |
| 292 | monkeypatch: MonkeyPatch, |
| 293 | conda_cli: CondaCLIFixture, |
| 294 | ): |
| 295 | with tmp_env() as prefix: |
| 296 | monkeypatch.setenv("CONDA_SAFETY_CHECKS", "warn") |
| 297 | monkeypatch.setenv("CONDA_EXTRA_SAFETY_CHECKS", "true") |
| 298 | reset_context() |
| 299 | assert context.safety_checks is SafetyChecks.warn |
| 300 | assert context.extra_safety_checks |
| 301 | |
| 302 | stdout, stderr, code = conda_cli( |
| 303 | "install", |
| 304 | f"--prefix={prefix}", |
| 305 | "--channel=conda-test", |
| 306 | "spiffy-test-app=0.5", |
| 307 | "--yes", |
| 308 | ) |
| 309 | assert stdout |
| 310 | # conda-test::spiffy-test-app=0.5 is a modified version of conda-test::spiffy-test-app=1.0 |
| 311 | assert ( |
| 312 | dals( |
| 313 | """ |
| 314 | The path 'site-packages/spiffy_test_app-1.0-py2.7.egg-info/top_level.txt' |
| 315 | has an incorrect size. |
| 316 | reported size: 32 bytes |
| 317 | actual size: 16 bytes |
| 318 | """ |
| 319 | ) |
| 320 | in stderr |
| 321 | ) |
| 322 | assert "has a sha256 mismatch." in stderr |
| 323 | assert not code |
| 324 | assert package_is_installed(prefix, "spiffy-test-app=0.5") |
| 325 | |
| 326 | |
| 327 | def test_safety_checks_disabled( |
nothing calls this directly
no test coverage detected
searching dependent graphs…