(mock_link, mock_rename, tmpdir)
| 66 | @patch('os.link') |
| 67 | @patch('os.rename') |
| 68 | def test_rewrite_etc_hosts_no_overwrite(mock_link, mock_rename, tmpdir): |
| 69 | mock_link.side_effect = OSError |
| 70 | mock_rename.side_effect = OSError |
| 71 | |
| 72 | with pytest.raises(OSError): |
| 73 | os.link('/test_from', '/test_to') |
| 74 | |
| 75 | with pytest.raises(OSError): |
| 76 | os.rename('/test_from', '/test_to') |
| 77 | |
| 78 | test_rewrite_etc_hosts(tmpdir) |
| 79 | |
| 80 | |
| 81 | def test_subnet_weight(): |
nothing calls this directly
no test coverage detected