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
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
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
MBEES
ICARTT Python Package
Commits
5dd63a84
Commit
5dd63a84
authored
3 years ago
by
Florian Obersteiner
Browse files
Options
Downloads
Patches
Plain Diff
minor refactor
parent
5f540bbd
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!5
introduction of pathlib.Path
This commit is part of merge request
!5
. Comments created here will be created in the context of that merge request.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_dataset.py
+10
-10
10 additions, 10 deletions
tests/test_dataset.py
with
10 additions
and
10 deletions
tests/test_dataset.py
+
10
−
10
View file @
5dd63a84
...
...
@@ -12,24 +12,24 @@ fns = (wd/'examples').glob('*.ict')
def
compareFiles
(
fn
,
strIn
,
strOut
,
skiplines
=
0
,
nlines
=-
1
):
# pragma: no cover
strOut
.
seek
(
0
)
strIn
.
seek
(
0
)
input
=
strIn
.
readlines
()
outp
ut
=
strOut
.
readlines
()
content_in
=
strIn
.
readlines
()
content_o
ut
=
strOut
.
readlines
()
strIn
.
close
()
strOut
.
close
()
if
nlines
>
0
:
input
=
input
[
skiplines
:(
skiplines
+
nlines
)]
output
=
outp
ut
[
skiplines
:(
skiplines
+
nlines
)]
content_in
=
content_in
[
skiplines
:(
skiplines
+
nlines
)]
content_out
=
content_o
ut
[
skiplines
:(
skiplines
+
nlines
)]
else
:
input
=
input
[
skiplines
:]
output
=
outp
ut
[
skiplines
:]
content_in
=
content_in
[
skiplines
:]
content_out
=
content_o
ut
[
skiplines
:]
if
not
len
(
input
)
==
len
(
outp
ut
):
if
not
len
(
content_in
)
==
len
(
content_o
ut
):
return
False
for
i
in
range
(
len
(
inp
ut
)
)
:
inline
=
in
put
[
i
]
.
strip
().
replace
(
"
"
,
""
)
outline
=
out
put
[
i
]
.
strip
().
replace
(
"
"
,
""
)
for
i
nline
,
outline
in
zip
(
content_in
,
content_o
ut
):
inline
=
in
line
.
strip
().
replace
(
"
"
,
""
)
outline
=
out
line
.
strip
().
replace
(
"
"
,
""
)
if
not
inline
==
outline
:
valid_data_line
=
False
# maybe this is a data line in which we only have different number formatting?
...
...
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