Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flex Extract
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Flexpart
Flex Extract
Commits
565fd937
Commit
565fd937
authored
6 years ago
by
Anne Philipp
Browse files
Options
Downloads
Patches
Plain Diff
added test class for EcFlexpart unit tests
parent
fdda1b9d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/pythontest/TestEcFlexpart.py
+56
-0
56 additions, 0 deletions
source/pythontest/TestEcFlexpart.py
with
56 additions
and
0 deletions
source/pythontest/TestEcFlexpart.py
0 → 100644
+
56
−
0
View file @
565fd937
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
sys
import
os
import
inspect
import
pytest
sys
.
path
.
append
(
'
../python
'
)
import
_config
from
classes.EcFlexpart
import
EcFlexpart
from
classes.ControlFile
import
ControlFile
from
mods.tools
import
silent_remove
class
TestEcFlexpart
():
'''
'''
def
test_write_namelist
(
self
):
import
filecmp
control_file
=
os
.
path
.
join
(
_config
.
PATH_TEST_DIR
,
'
TestData
'
,
'
CONTROL.temp
'
)
c
=
ControlFile
(
control_file
)
flexpart
=
EcFlexpart
(
c
)
c
.
inputdir
=
'
TestData
'
# comparison file
testfile
=
os
.
path
.
join
(
_config
.
PATH_TEST_DIR
,
'
TestData
'
,
'
convert.nl.test
'
)
# create
flexpart
.
write_namelist
(
c
)
finalfile
=
os
.
path
.
join
(
c
.
inputdir
,
_config
.
FILE_NAMELIST
)
assert
filecmp
.
cmp
(
testfile
,
finalfile
,
shallow
=
False
)
# delete test file
silent_remove
(
finalfile
)
# these functions should test the output and compare the results with an output
# of the old version and check if there are no differences!!!
# also check for errors?! Or check if it works for alle datasets and private public etc
# - process_output
# - create
# - deacc_fluxes
# - retrieve
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