Skip to content
Snippets Groups Projects

Clean up & add unit tests

Merged Davide Fazzini requested to merge dfazzini_unit_tests_configuration into master
6 files
+ 17
40
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -105,25 +105,3 @@ def test_create_options_templates():
os.remove('test_inputdb_template.yaml')
os.remove('test_jobopt_template.yaml')
"""
def run_simple_job():
""
Check that DaVinci can run a minimal job with a simple configuration based only on PyConf.
""
cmd = 'davinci create-options-template job -f test_jobopt_template.yaml'
result = subprocess.run(cmd, shell=True)
cmd = 'davinci --export test_run_simple_job.opts --dry-run run-mc -i Upgrade_Bd2KstarMuMu - -j test_jobopt_template.yaml'
result = subprocess.run(cmd, shell=True)
# Just be maniac - the command should work ;-)
assert result.returncode == 0
# Inspect the .opts file and check if the input files option is filled correctly.
with open("test_run_simple_job.opts") as f:
assert any('Gaudi__Examples__VoidConsumer' in line for line in f.readlines())
os.remove('test_jobopt_template.yaml')
"""
Loading