Skip to content
Snippets Groups Projects
Commit 6c7b1065 authored by Patrick Koppenburg's avatar Patrick Koppenburg :leaves:
Browse files

Merge branch 'erodrigu-dv-exe-pytest-1' into 'master'

Add test of override_data_options option set in random order

See merge request !611
parents f7808856 91b641e5
No related branches found
No related tags found
2 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!611Add test of override_data_options option set in random order
Pipeline #3359008 passed
......@@ -46,3 +46,24 @@ def test_override_job_option():
for line in f.readlines())
os.remove("test_override_job_option.opts")
def test_override_job_option_bis():
"""
Verify the overriding of a DaVinci option on the fly,
no matter the order of the --override_data_options option
(see related test "test_override_job_option").
No need to actually run the job, hence the dry run.
"""
cmd = 'davinci --export test_override_job_option_bis.opts --dry-run run-mc --unpack_stream "/Event/Unknown" --override_data_options True --inputfiledb Upgrade_Bd2KstarMuMu -'
result = subprocess.run(cmd, shell=True)
# Just be maniac - the command should work ;-)
assert result.returncode == 0
# Inspect the produced .opts file and check for the option value overridden
with open("test_override_job_option_bis.opts") as f:
assert any('.unpack_stream = "/Event/Unknown";' in line
for line in f.readlines())
os.remove("test_override_job_option_bis.opts")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment