Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ICARTT Python Package
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zachary Sherman
ICARTT Python Package
Commits
0cb5da37
Commit
0cb5da37
authored
2 years ago
by
Florian Obersteiner
Browse files
Options
Downloads
Patches
Plain Diff
added test for revision parser
parent
26c10427
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_1001.py
+0
-1
0 additions, 1 deletion
tests/test_1001.py
tests/test_bulkIO.py
+5
-2
5 additions, 2 deletions
tests/test_bulkIO.py
with
5 additions
and
3 deletions
tests/test_1001.py
+
0
−
1
View file @
0cb5da37
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_bulkIO.py
+
5
−
2
View file @
0cb5da37
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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment