Skip to content
Snippets Groups Projects
Commit 0cb5da37 authored by Florian Obersteiner's avatar Florian Obersteiner
Browse files

added test for revision parser

parent 26c10427
No related branches found
No related tags found
No related merge requests found
......@@ -163,7 +163,6 @@ class Simple1001TestCase(unittest.TestCase):
["Use of these data requires PRIOR OK from the PI"],
)
self.assertEqual(ict.normalComments.keywords["OTHER_COMMENTS"].data, ["N/A"])
# TODO test revision information
def testReadData(self):
ict = icartt.Dataset(self.fn, loadData=True)
......
import unittest
import pathlib
import io
import re
# import pytest
import icartt
......@@ -44,7 +44,7 @@ fileinfo = {
}
# TODO: dataset -> close file pointer after read ?!
# TODO? dataset -> close file pointer after read
class BulkIOTestCase(unittest.TestCase):
......@@ -75,6 +75,9 @@ class BulkIOTestCase(unittest.TestCase):
with self.subTest(msg=f"Reading data from test file {str(fn)}"):
ict = icartt.Dataset(fn, loadData=True)
self.assertEqual(type(ict), icartt.Dataset)
m = re.search("R([a-zA-Z0-9]).ict", fn.name)
if m:
self.assertEqual(m.groups()[0], ict.revision)
def testWriteHeader(self):
for fn in self.files_ok:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment