Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gaudi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Gaudi
Gaudi
Commits
6a26b3ff
Commit
6a26b3ff
authored
1 year ago
by
Marco Clemencic
Browse files
Options
Downloads
Plain Diff
Fixed JSON validation, which was not taking order into account
See merge request
!1496
parents
7c341946
a107e474
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1496
Fixed JSON validation, which was not taking order into account
Pipeline
#6366556
passed
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GaudiPolicy/python/GaudiTesting/BaseTest.py
+5
-0
5 additions, 0 deletions
GaudiPolicy/python/GaudiTesting/BaseTest.py
with
5 additions
and
0 deletions
GaudiPolicy/python/GaudiTesting/BaseTest.py
+
5
−
0
View file @
6a26b3ff
...
...
@@ -1511,6 +1511,11 @@ class JSONOutputValidator:
# piggyback on TestCase dict diff report
t
=
TestCase
()
# sort both lists (these are list of entities) as the order is not supposed to matter
# indeed, the JSONSink implementation does not garantee any particular order
# but as JSON does not have sets, we get back a sorted list here
expected
=
sorted
(
expected
,
key
=
lambda
item
:
(
item
[
"
component
"
],
item
[
"
name
"
]))
out
=
sorted
(
out
,
key
=
lambda
item
:
(
item
[
"
component
"
],
item
[
"
name
"
]))
try
:
t
.
assertEqual
(
expected
,
out
)
except
AssertionError
as
err
:
...
...
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