Ejemplo n.º 1
0
def test_migrate_page_call_failure(syscall_mock, log_mock):
    with pytest.raises(UnableToMigratePages):
        _migrate_page_call(1, 2, 1, 2)
    log_mock.assert_not_called()
Ejemplo n.º 2
0
def test_migrate_page_call_success(syscall_mock, log_mock):
    _migrate_page_call(1, 2, 1, 2)
    log_mock.assert_called_once_with(
        9, 'Number of not moved pages (return '
        'from migrate_pages syscall): %d', 0)