Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LHCb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
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
LHCb
LHCb
Commits
8ebed8a5
Commit
8ebed8a5
authored
3 years ago
by
Alex Pearce
Browse files
Options
Downloads
Patches
Plain Diff
Only look for depth specifiers at string ends.
Closes
#134
.
parent
bdc20132
No related branches found
No related tags found
1 merge request
!3066
Only look for depth specifiers at string ends
Pipeline
#2623075
passed
3 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
PyConf/python/PyConf/application.py
+1
-1
1 addition, 1 deletion
PyConf/python/PyConf/application.py
PyConf/python/PyConf/tests/test_application.py
+3
-0
3 additions, 0 deletions
PyConf/python/PyConf/tests/test_application.py
with
4 additions
and
1 deletion
PyConf/python/PyConf/application.py
+
1
−
1
View file @
8ebed8a5
...
...
@@ -80,7 +80,7 @@ def format_output_location(l, add_depth=True):
except
AttributeError
:
pass
# Ensure the location ends with the depth specification `#N` or `#*`
if
add_depth
and
not
re
.
match
(
r
"
.*#(\d+|\*)
"
,
l
):
if
add_depth
and
not
re
.
match
(
r
"
.*#(\d+|\*)
$
"
,
l
):
l
=
"
{}#1
"
.
format
(
l
)
return
l
...
...
This diff is collapsed.
Click to expand it.
PyConf/python/PyConf/tests/test_application.py
+
3
−
0
View file @
8ebed8a5
...
...
@@ -19,6 +19,9 @@ def test_format_output_location():
assert
format_output_location
(
"
/Event/Tracks#1
"
)
==
"
/Event/Tracks#1
"
assert
format_output_location
(
"
/Event/Tracks#93
"
)
==
"
/Event/Tracks#93
"
assert
format_output_location
(
"
/Event/Tracks#*
"
)
==
"
/Event/Tracks#*
"
# Should ignore intermediate 'depth specifiers'
assert
format_output_location
(
"
/Event/Tracks#1/Output
"
)
==
"
/Event/Tracks#1/Output#1
"
# Should accept a DataHandle object as an argument
producer
=
Gaudi__Examples__IntDataProducer
()
assert
format_output_location
(
producer
.
OutputLocation
)
==
"
{}#1
"
.
format
(
...
...
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