MCPcopy
hub / github.com/mne-tools/mne-python / test_date_none

Function test_date_none

mne/tests/test_annotations.py:1379–1393  ·  view source on GitHub ↗

Test that DATE_NONE is used properly.

(tmp_path)

Source from the content-addressed store, hash-verified

1377
1378
1379def test_date_none(tmp_path):
1380 """Test that DATE_NONE is used properly."""
1381 # Regression test for gh-5908
1382 n_chans = 139
1383 n_samps = 20
1384 data = np.random.random_sample((n_chans, n_samps))
1385 ch_names = [f"E{x}" for x in range(n_chans)]
1386 ch_types = ["eeg"] * n_chans
1387 info = create_info(ch_names=ch_names, ch_types=ch_types, sfreq=2048)
1388 assert info["meas_date"] is None
1389 raw = RawArray(data=data, info=info)
1390 fname = tmp_path / "test-raw.fif"
1391 raw.save(fname)
1392 raw_read = read_raw_fif(fname, preload=True)
1393 assert raw_read.info["meas_date"] is None
1394
1395
1396def test_negative_meas_dates(windows_like_datetime):

Callers

nothing calls this directly

Calls 4

create_infoFunction · 0.90
RawArrayClass · 0.90
read_raw_fifFunction · 0.90
saveMethod · 0.45

Tested by

no test coverage detected