Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Martin Claus
py-namelist
Commits
a436be61
Commit
a436be61
authored
Oct 04, 2018
by
Martin Claus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for string output
parent
45289262
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
tests/test_parsing.py
tests/test_parsing.py
+13
-0
No files found.
tests/test_parsing.py
View file @
a436be61
...
...
@@ -35,6 +35,19 @@ def test_parse_string(string):
assert
nml
.
name
==
"nml"
@
pytest
.
mark
.
parametrize
(
"string"
,
[
"&nml
\n
/
\n
"
,
"&nml
\n
val1 = 3
\n
/
\n
"
,
"&nml
\n
val1 = .TRUE.
\n
/
\n
"
,
# "&nml\n,val1 = (/1,2,3,4,5,6/)\n/\n",
]
)
def
test_string_out
(
string
):
nml
=
namelist
.
parse_namelist_string
(
string
)[
0
]
assert
str
(
nml
)
==
string
@
pytest
.
mark
.
parametrize
(
"string"
,
[
"&nml2 val=34 &end"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment