Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
dumux-repositories
dumux
Commits
4c53ac1f
Commit
4c53ac1f
authored
7 years ago
by
Kilian Weishaupt
Committed by
Timo Koch
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[bin][fuzzycomparedata.py] Make compatible with python3
* use brackets for print function
parent
8788ca46
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!617
[WIP] Next
,
!538
Fix/make testscript compatible for python3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/testing/fuzzycomparedata.py
+2
-1
2 additions, 1 deletion
bin/testing/fuzzycomparedata.py
bin/testing/fuzzycomparevtu.py
+1
-0
1 addition, 0 deletions
bin/testing/fuzzycomparevtu.py
with
3 additions
and
1 deletion
bin/testing/fuzzycomparedata.py
+
2
−
1
View file @
4c53ac1f
...
...
@@ -5,6 +5,7 @@ Applicable for all style formats like e.g. csv files.
Fuzzy compares numbers by using absolute and/or relative difference comparison.
"""
from
__future__
import
print_function
import
argparse
import
csv
import
json
...
...
@@ -45,7 +46,7 @@ def compare_data(dataFile1, dataFile2, delimiter, absolute=1.5e-7, relative=1e-2
data2
=
list
(
csv
.
reader
(
open
(
dataFile2
,
'
rb
'
),
delimiter
=
delimiter
))
if
(
len
(
data1
)
!=
len
(
data2
)):
print
"
Length of data1 and data2 not equal: ref=
"
,
len
(
data1
),
"
,new=
"
,
len
(
data2
),
"
. Aborting!
"
print
(
"
Length of data1 and data2 not equal: ref=
"
,
len
(
data1
),
"
,new=
"
,
len
(
data2
),
"
. Aborting!
"
)
exit
(
3
)
is_equal
=
True
...
...
This diff is collapsed.
Click to expand it.
bin/testing/fuzzycomparevtu.py
+
1
−
0
View file @
4c53ac1f
...
...
@@ -5,6 +5,7 @@ for all VTK style formats like VTK files. Fuzzy compares numbers by
using absolute and/or relative difference comparison.
"""
from
__future__
import
print_function
from
__future__
import
absolute_import
import
argparse
import
xml.etree.ElementTree
as
ET
...
...
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