def test_line_endings():
 tempdir = _TempDir()
 with open(op.join(tempdir, 'foo'), 'wb') as fid:
  fid.write('bad\r\ngood\n'.encode('ascii'))
 _assert_line_endings(tempdir)
 with open(op.join(tempdir, 'bad.py'), 'wb') as fid:
  fid.write('\x97')
 assert_raises(AssertionError, _assert_line_endings, tempdir)
 with open(op.join(tempdir, 'bad.py'), 'wb') as fid:
  fid.write('bad\r\ngood\n'.encode('ascii'))
 assert_raises(AssertionError, _assert_line_endings, tempdir)
 _assert_line_endings(_get_root_dir())

def test_line_endings ( ) : tempdir = _TempDir ( ) with open ( op . join ( tempdir , 'foo' ) , 'wb' ) as fid : fid . write ( 'bad\r\ngood\n' . encode ( 'ascii' ) ) _assert_line_endings ( tempdir ) with open ( op . join ( tempdir , 'bad.py' ) , 'wb' ) as fid : fid . write ( '\x97' ) assert_raises ( AssertionError , _assert_line_endings , tempdir ) with open ( op . join ( tempdir , 'bad.py' ) , 'wb' ) as fid : fid . write ( 'bad\r\ngood\n' . encode ( 'ascii' ) ) assert_raises ( AssertionError , _assert_line_endings , tempdir ) _assert_line_endings ( _get_root_dir ( ) )
test line endings of mne-python .