Skip to content

Conversation

@larsoner
Copy link
Member

It occurred to me that it might be nice to have a specific regression test for #5908.

@massich might be good to have while working on #5857

@larsoner larsoner added this to the 0.18 milestone May 14, 2019
@codecov
Copy link

codecov bot commented May 15, 2019

Codecov Report

Merging #6313 into master will increase coverage by 0.2%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #6313     +/-   ##
=========================================
+ Coverage   89.18%   89.39%   +0.2%     
=========================================
  Files         417      417             
  Lines       75158    75960    +802     
  Branches    12375    12727    +352     
=========================================
+ Hits        67033    67906    +873     
+ Misses       5240     5192     -48     
+ Partials     2885     2862     -23

@massich
Copy link
Contributor

massich commented May 15, 2019

This already works with v0.16, so I don't really understand what was not working with #5908

Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.4.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import mne                                                                               

In [2]: mne.__version__                                                                          
Out[2]: '0.16.0'

In [3]: import os.path as op 
   ...:  
   ...: import numpy as np 
   ...:  
   ...: from mne import create_info 
   ...: from mne.io import read_raw_fif, RawArray 
   ...:  
   ...:  
   ...: tmpdir = '/tmp/' 
   ...:  
   ...: # def test_date_none(tmpdir): 
   ...: """Test that DATE_NONE is used properly.""" 
   ...: # Regression test for gh-5908 
   ...: n_chans = 139 
   ...: n_samps = 20 
   ...: data = np.random.random_sample((n_chans, n_samps)) 
   ...: ch_names = ['E{}'.format(x) for x in range(n_chans)] 
   ...: ch_types = ['eeg'] * n_chans 
   ...: info = create_info(ch_names=ch_names, ch_types=ch_types, sfreq=2048) 
   ...: assert info['meas_date'] is None 
   ...: raw = RawArray(data=data, info=info) 
   ...: fname = op.join(str(tmpdir), 'test-raw.fif') 
   ...: raw.save(fname) 
   ...: raw_read = read_raw_fif(fname, preload=True) 
   ...: assert raw_read.info['meas_date'] is None 
   ...:                                                                                          

In [4]:                                                                                          

But I'm +1 to add it

@massich massich changed the title MRG, MAINT: Extra test for annotations MAINT: Extra test for annotations May 15, 2019
@massich massich merged commit 0f7c7aa into mne-tools:master May 15, 2019
@larsoner larsoner deleted the extra-test branch May 15, 2019 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants