(log_file: Path, paste_url: str, max_byte: int | None)
| 105 | @given(paste_url=urls, max_byte=max_bytes) |
| 106 | @settings(max_examples=3, suppress_health_check=[HealthCheck.function_scoped_fixture]) |
| 107 | def test_network_error(log_file: Path, paste_url: str, max_byte: int | None) -> None: |
| 108 | log_file.write_text('some log content') |
| 109 | |
| 110 | with ( |
| 111 | patch('archinstall.lib.log.logger._path', new=log_file.parent), |
| 112 | patch('urllib.request.urlopen', side_effect=urllib.error.URLError('no network')), |
| 113 | ): |
| 114 | assert share_install_log(paste_url, max_byte) is None |
| 115 | |
| 116 | |
| 117 | @given(paste_url=urls, max_byte=max_bytes) |
nothing calls this directly
no test coverage detected