(monkeypatch: MonkeyPatch)
| 83 | |
| 84 | @pytest.mark.integration |
| 85 | def test_tmpDownload(monkeypatch: MonkeyPatch): |
| 86 | monkeypatch.setenv("CONDA_REMOTE_CONNECT_TIMEOUT_SECS", "1") |
| 87 | monkeypatch.setenv("CONDA_REMOTE_READ_TIMEOUT_SECS", "1") |
| 88 | monkeypatch.setenv("CONDA_REMOTE_MAX_RETRIES", "1") |
| 89 | reset_context() |
| 90 | assert context.remote_connect_timeout_secs == 1 |
| 91 | assert context.remote_read_timeout_secs == 1 |
| 92 | assert context.remote_max_retries == 1 |
| 93 | |
| 94 | url = "https://repo.anaconda.com/pkgs/free/osx-64/appscript-1.0.1-py27_0.tar.bz2" |
| 95 | with TmpDownload(url) as dst: |
| 96 | assert exists(dst) |
| 97 | assert isfile(dst) |
| 98 | |
| 99 | msg = "Rock and Roll Never Die" |
| 100 | with TmpDownload(msg) as result: |
| 101 | assert result == msg |
| 102 | |
| 103 | |
| 104 | @responses.activate |
nothing calls this directly
no test coverage detected
searching dependent graphs…