@slow_test
@testing.requires_testing_data
def test_write_source_space():
    tempdir = _TempDir()
    src0 = read_source_spaces(fname, patch_stats=False)
    write_source_spaces(op.join(tempdir, 'tmp-src.fif'), src0)
    src1 = read_source_spaces(op.join(tempdir, 'tmp-src.fif'),
                              patch_stats=False)
    _compare_source_spaces(src0, src1)

    # test warnings on bad filenames
    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter('always')
        src_badname = op.join(tempdir, 'test-bad-name.fif.gz')
        write_source_spaces(src_badname, src0)
        read_source_spaces(src_badname)
    assert_naming(w, 'test_source_space.py', 2)
:param build_json_store: str, path to directory with JSON build files
dataset/ETHPy150Open mne-tools/mne-python/mne/tests/test_source_space.py/test_write_source_space--crossover with--dataset/ETHPy150Open projectatomic/osbs-client/osbs/build/build_request.py/CommonBuild.__init__