(dir_server)
| 137 | |
| 138 | |
| 139 | def test_errors(dir_server): |
| 140 | f = open_files(root + "doesnotexist")[0] |
| 141 | with pytest.raises(errs), f as f: |
| 142 | f.read() |
| 143 | f = open_files("http://nohost/")[0] |
| 144 | |
| 145 | expected = FileNotFoundError |
| 146 | |
| 147 | with pytest.raises(expected), f as f: |
| 148 | f.read() |
| 149 | fn = files[0] |
| 150 | f = open_files(root + fn, mode="wb")[0] |
| 151 | with pytest.raises(NotImplementedError), f: |
| 152 | pass |
| 153 | f = open_files(root + fn)[0] |
| 154 | with pytest.raises(ValueError), f as f: |
| 155 | f.seek(-1) |
| 156 | |
| 157 | |
| 158 | def test_files(dir_server): |
nothing calls this directly
no outgoing calls
no test coverage detected