MCPcopy Create free account
hub / github.com/archlinux/archinstall / test_network_error

Function test_network_error

tests/test_share_log.py:107–114  ·  view source on GitHub ↗
(log_file: Path, paste_url: str, max_byte: int | None)

Source from the content-addressed store, hash-verified

105@given(paste_url=urls, max_byte=max_bytes)
106@settings(max_examples=3, suppress_health_check=[HealthCheck.function_scoped_fixture])
107def 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)

Callers

nothing calls this directly

Calls 1

share_install_logFunction · 0.90

Tested by

no test coverage detected