ATLAS Offline Software
Loading...
Searching...
No Matches
python.EventSelectionConfigChaining_unitTest.TestSave Class Reference
Inheritance diagram for python.EventSelectionConfigChaining_unitTest.TestSave:
Collaboration diagram for python.EventSelectionConfigChaining_unitTest.TestSave:

Public Member Functions

 test_implicit_save_emitted_without_save_line (self)
 test_explicit_save_is_deprecated_but_honoured (self)
 test_save_bad_argcount (self)

Detailed Description

Definition at line 62 of file EventSelectionConfigChaining_unitTest.py.

Member Function Documentation

◆ test_explicit_save_is_deprecated_but_honoured()

python.EventSelectionConfigChaining_unitTest.TestSave.test_explicit_save_is_deprecated_but_honoured ( self)

Definition at line 72 of file EventSelectionConfigChaining_unitTest.py.

72 def test_explicit_save_is_deprecated_but_honoured(self):
73 with self.assertWarns(FutureWarning):
74 algs = run("EL_N 25000 >= 1\nSAVE", containers={"electrons": "AnaElectrons"})
75 save = [a for a in algs if a.getType() == "CP::SaveFilterAlg"]
76 self.assertEqual(len(save), 1) # not doubled by the implicit one
77
int run(int argc, char *argv[])

◆ test_implicit_save_emitted_without_save_line()

python.EventSelectionConfigChaining_unitTest.TestSave.test_implicit_save_emitted_without_save_line ( self)

Definition at line 63 of file EventSelectionConfigChaining_unitTest.py.

63 def test_implicit_save_emitted_without_save_line(self):
64 # the event filter is now created automatically at the end of a block
65 algs = run("EL_N 25000 >= 1", containers={"electrons": "AnaElectrons"})
66 save = [a for a in algs if a.getType() == "CP::SaveFilterAlg"]
67 self.assertEqual(len(save), 1)
68 self.assertEqual(prop(save[0], "selectionName"), "pass_SR_%SYS%,as_char")
69 self.assertEqual(prop(save[0], "decorationName"), "ntuplepass_SR_%SYS%")
70 self.assertTrue(prop(save[0], "noFilter"))
71

◆ test_save_bad_argcount()

python.EventSelectionConfigChaining_unitTest.TestSave.test_save_bad_argcount ( self)

Definition at line 78 of file EventSelectionConfigChaining_unitTest.py.

78 def test_save_bad_argcount(self):
79 self.assertRaises(ValueError, run, "EL_N 25000 >= 1\nSAVE now",
80 containers={"electrons": "AnaElectrons"})
81
82

The documentation for this class was generated from the following file: