Beispiel #1
0
 def test_get_lines(self):
     # test with a unicode string
     path = os.path.join(self.current_dir_output, 'foo.nc')
     with nc_scope(path, 'w') as ds:
         ds.foo = u'a bad \u2013 unicode character'
         md = NcMetadata(rootgrp=ds)
         ds.sync()
         lines = md.get_lines()
     self.assertEqual(lines[4], '// global attributes:')