Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
km3io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
km3py
km3io
Commits
f26ee18a
Commit
f26ee18a
authored
4 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests
parent
89d0c2e9
No related branches found
No related tags found
1 merge request
!47
Resolve "uproot4 integration"
Pipeline
#16352
passed with warnings
4 years ago
Stage: test
Stage: coverage
Stage: doc
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_tools.py
+16
-16
16 additions, 16 deletions
tests/test_tools.py
with
16 additions
and
16 deletions
tests/test_tools.py
+
16
−
16
View file @
f26ee18a
...
@@ -109,10 +109,10 @@ class TestBestTrackSelection(unittest.TestCase):
...
@@ -109,10 +109,10 @@ class TestBestTrackSelection(unittest.TestCase):
assert
len
(
best
)
==
10
assert
len
(
best
)
==
10
assert
best
.
rec_stages
[
0
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
0
].
tolist
()
==
[
1
,
3
,
5
,
4
]
assert
best
.
rec_stages
[
1
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
1
].
tolist
()
==
[
1
,
3
,
5
,
4
]
assert
best
.
rec_stages
[
2
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
2
].
tolist
()
==
[
1
,
3
,
5
,
4
]
assert
best
.
rec_stages
[
3
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
3
].
tolist
()
==
[
1
,
3
,
5
,
4
]
# test with a shorter set of rec_stages
# test with a shorter set of rec_stages
best2
=
best_track
(
self
.
events
.
tracks
,
stages
=
{
1
,
3
})
best2
=
best_track
(
self
.
events
.
tracks
,
stages
=
{
1
,
3
})
...
@@ -128,20 +128,20 @@ class TestBestTrackSelection(unittest.TestCase):
...
@@ -128,20 +128,20 @@ class TestBestTrackSelection(unittest.TestCase):
assert
len
(
best
)
==
10
assert
len
(
best
)
==
10
assert
best
.
rec_stages
[
0
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
0
].
tolist
()
==
[
1
,
3
,
5
,
4
]
assert
best
.
rec_stages
[
1
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
1
].
tolist
()
==
[
1
,
3
,
5
,
4
]
assert
best
.
rec_stages
[
2
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
2
].
tolist
()
==
[
1
,
3
,
5
,
4
]
assert
best
.
rec_stages
[
3
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
3
].
tolist
()
==
[
1
,
3
,
5
,
4
]
# test with shorter stages
# test with shorter stages
best2
=
best_track
(
self
.
events
.
tracks
,
startend
=
(
1
,
3
))
best2
=
best_track
(
self
.
events
.
tracks
,
startend
=
(
1
,
3
))
assert
len
(
best2
)
==
10
assert
len
(
best2
)
==
10
assert
best2
.
rec_stages
[
0
].
tolist
()
==
[
[
1
,
3
]
]
assert
best2
.
rec_stages
[
0
].
tolist
()
==
[
1
,
3
]
assert
best2
.
rec_stages
[
1
].
tolist
()
==
[
[
1
,
3
]
]
assert
best2
.
rec_stages
[
1
].
tolist
()
==
[
1
,
3
]
assert
best2
.
rec_stages
[
2
].
tolist
()
==
[
[
1
,
3
]
]
assert
best2
.
rec_stages
[
2
].
tolist
()
==
[
1
,
3
]
assert
best2
.
rec_stages
[
3
].
tolist
()
==
[
[
1
,
3
]
]
assert
best2
.
rec_stages
[
3
].
tolist
()
==
[
1
,
3
]
# test the importance of start as a real start of rec_stages
# test the importance of start as a real start of rec_stages
best3
=
best_track
(
self
.
events
.
tracks
,
startend
=
(
0
,
3
))
best3
=
best_track
(
self
.
events
.
tracks
,
startend
=
(
0
,
3
))
...
@@ -288,10 +288,10 @@ class TestBestJmuon(unittest.TestCase):
...
@@ -288,10 +288,10 @@ class TestBestJmuon(unittest.TestCase):
assert
len
(
best
)
==
10
assert
len
(
best
)
==
10
assert
best
.
rec_stages
[
0
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
0
].
tolist
()
==
[
1
,
3
,
5
,
4
]
assert
best
.
rec_stages
[
1
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
1
].
tolist
()
==
[
1
,
3
,
5
,
4
]
assert
best
.
rec_stages
[
2
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
2
].
tolist
()
==
[
1
,
3
,
5
,
4
]
assert
best
.
rec_stages
[
3
].
tolist
()
==
[
[
1
,
3
,
5
,
4
]
]
assert
best
.
rec_stages
[
3
].
tolist
()
==
[
1
,
3
,
5
,
4
]
assert
best
.
lik
[
0
]
==
ak
.
max
(
OFFLINE_FILE
.
events
.
tracks
.
lik
[
0
])
assert
best
.
lik
[
0
]
==
ak
.
max
(
OFFLINE_FILE
.
events
.
tracks
.
lik
[
0
])
assert
best
.
lik
[
1
]
==
ak
.
max
(
OFFLINE_FILE
.
events
.
tracks
.
lik
[
1
])
assert
best
.
lik
[
1
]
==
ak
.
max
(
OFFLINE_FILE
.
events
.
tracks
.
lik
[
1
])
...
...
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