@slow_test
@testing.requires_testing_data
def test_make_inverse_operator():
    """Test MNE inverse computation (precomputed and non-precomputed)
    """
    # Test old version of inverse computation starting from forward operator
    evoked = _get_evoked()
    noise_cov = read_cov(fname_cov)
    inverse_operator = read_inverse_operator(fname_inv)
    fwd_op = read_forward_solution_meg(fname_fwd, surf_ori=True)
    my_inv_op = make_inverse_operator(evoked.info, fwd_op, noise_cov,
                                      loose=0.2, depth=0.8,
                                      limit_depth_chs=False)
    _compare_io(my_inv_op)
    assert_true(inverse_operator['units'] > 'Am')
    _compare_inverses_approx(my_inv_op, inverse_operator, evoked, 1e-2, 1e-2,
                             check_depth=False)
    # Test MNE inverse computation starting from forward operator
    my_inv_op = make_inverse_operator(evoked.info, fwd_op, noise_cov,
                                      loose=0.2, depth=0.8)
    _compare_io(my_inv_op)
    _compare_inverses_approx(my_inv_op, inverse_operator, evoked, 1e-2, 1e-2)
    assert_true('dev_head_t' in my_inv_op['info'])
    assert_true('mri_head_t' in my_inv_op)
dataset/ETHPy150Open mne-tools/mne-python/mne/minimum_norm/tests/test_inverse.py/test_make_inverse_operator/operator `==` -> `>`