Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
source-extractor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Duc Cao
source-extractor
Commits
47791e72
Commit
47791e72
authored
6 years ago
by
Duc Cao
Browse files
Options
Downloads
Patches
Plain Diff
Helper script to compare files in 2 folders
parent
2eec3507
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_output.py
+21
-0
21 additions, 0 deletions
check_output.py
with
21 additions
and
0 deletions
check_output.py
0 → 100644
+
21
−
0
View file @
47791e72
import
os
is_correct_output
=
True
output_folder
=
'
out/
'
expected_output_folder
=
'
expected_output/
'
for
file_name
in
os
.
listdir
(
output_folder
):
with
open
(
os
.
path
.
join
(
output_folder
,
file_name
))
as
f
:
out
=
f
.
read
()
with
open
(
os
.
path
.
join
(
expected_output_folder
,
file_name
))
as
f
:
expected
=
f
.
read
()
if
out
!=
expected
:
print
(
'
DIFF
'
,
file_name
)
is_correct_output
=
False
if
len
(
os
.
listdir
(
output_folder
))
!=
len
(
os
.
listdir
(
expected_output_folder
)):
print
(
'
Different number of output files
'
)
is_correct_output
=
False
if
is_correct_output
:
print
(
'
Correct output
'
)
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