CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
data_sources_tests.data_sources_tests Class Reference
Inheritance diagram for data_sources_tests.data_sources_tests:

Public Member Functions

def setUp (self)
 
def tearDown (self)
 
def test_check_types (self)
 
def test_json_building (self)
 
def test_json_navigation (self)
 
def test_make_json_dict (self)
 
def test_make_json_list (self)
 
def test_type_all_iovs (self)
 
def test_type_all_tags (self)
 
def test_type_parent_global_tags (self)
 

Public Attributes

 connection
 

Detailed Description

Definition at line 17 of file data_sources_tests.py.

Member Function Documentation

def data_sources_tests.data_sources_tests.setUp (   self)

Definition at line 19 of file data_sources_tests.py.

19  def setUp(self):
20  self.connection = querying.connect(prod_connection_string, secrets=secrets_source)
21 
def connect(connection_data, mode="r", map_blobs=False, secrets=None, pooling=True)
Definition: querying.py:452
def data_sources_tests.data_sources_tests.tearDown (   self)

Definition at line 79 of file data_sources_tests.py.

79  def tearDown(self):
80  self.connection.tear_down()
def data_sources_tests.data_sources_tests.test_check_types (   self)

Definition at line 56 of file data_sources_tests.py.

References list(), and data_sources.json_data_node.make().

56  def test_check_types(self):
57  test_list = list(range(0, 10))
58  test_dict = {"key1" : "value1", "key2" : "value2", "key3" : "value3"}
59  json_list_object = data_sources.json_data_node.make(test_list)
60  json_dict_object = data_sources.json_data_node.make(test_dict)
61  self.assertTrue(isinstance(json_list_object, data_sources.json_list))
62  self.assertTrue(isinstance(json_dict_object, data_sources.json_dict))
63 
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def data_sources_tests.data_sources_tests.test_json_building (   self)

Definition at line 44 of file data_sources_tests.py.

References data_sources.json_data_node.make().

44  def test_json_building(self):
45  structure = {"key1" : [{"a" : 1, "b" : 3}, {"a" : 4, "b" : 8}], "key2" : ["header1", "header2", "header3"]}
46  new_structure = data_sources.json_data_node.make({})
47  new_structure.add_key([], "key1")
48  new_structure.get("key1").add_child({"a" : 1, "b" : 3})
49  new_structure.get("key1").add_child({"a" : 4, "b" : 8})
50  new_structure.add_key([], "key2")
51  new_structure.get("key2").add_child("header1")
52  new_structure.get("key2").add_child("header2")
53  new_structure.get("key2").add_child("header3")
54  self.assertEqual(new_structure.data(), structure)
55 
def data_sources_tests.data_sources_tests.test_json_navigation (   self)

Definition at line 38 of file data_sources_tests.py.

References data, and data_sources.json_data_node.make().

39  structure = {"key1" : [{"a" : 1, "b" : 3}, {"a" : 4, "b" : 8}], "key2" : ["header1", "header2", "header3"]}
40  json_structure_object = data_sources.json_data_node.make(structure)
41  self.assertEqual(json_structure_object.get("key1").data(), structure["key1"])
42  self.assertEqual(json_structure_object.get("key2").data(), structure["key2"])
43 
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
def data_sources_tests.data_sources_tests.test_make_json_dict (   self)

Definition at line 30 of file data_sources_tests.py.

References data, and data_sources.json_data_node.make().

31  test_dict = {"key1" : "value1", "key2" : "value2", "key3" : "value3"}
32  json_dict_object = data_sources.json_data_node.make(test_dict)
33  self.assertTrue(json_dict_object != None)
34  self.assertEqual(json_dict_object.data(), test_dict)
35  for key in test_dict:
36  self.assertEqual(json_dict_object.get(key).data(), test_dict[key])
37 
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
def data_sources_tests.data_sources_tests.test_make_json_list (   self)

Definition at line 22 of file data_sources_tests.py.

References data, list(), and data_sources.json_data_node.make().

23  test_list = list(range(0, 10))
24  json_list_object = data_sources.json_data_node.make(test_list)
25  self.assertTrue(json_list_object != None)
26  self.assertEqual(json_list_object.data(), test_list)
27  for n in range(0, len(test_list)):
28  self.assertEqual(json_list_object.get(n).data(), test_list[n])
29 
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def data_sources_tests.data_sources_tests.test_type_all_iovs (   self)

Definition at line 68 of file data_sources_tests.py.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor.all().

68  def test_type_all_iovs(self):
69  all_iovs = self.connection.iov().all(amount=10)
70  self.assertTrue(isinstance(all_iovs, data_sources.json_list))
71 
def data_sources_tests.data_sources_tests.test_type_all_tags (   self)

Definition at line 64 of file data_sources_tests.py.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor.all().

64  def test_type_all_tags(self):
65  all_tags = self.connection.tag().all(amount=10)
66  self.assertTrue(isinstance(all_tags, data_sources.json_list))
67 
def data_sources_tests.data_sources_tests.test_type_parent_global_tags (   self)

Definition at line 72 of file data_sources_tests.py.

73  tag_name = "EBAlignment_measured_v01_express"
74  tag = self.connection.tag(name=tag_name)
75  self.assertTrue(tag != None)
76  parent_gts = tag.parent_global_tags()
77  self.assertTrue(isinstance(parent_gts, data_sources.json_list))
78 

Member Data Documentation

data_sources_tests.data_sources_tests.connection