Lines Matching full:cd

77         cd = ControlData({'suite': 'foo,bar'}, 'filename')
78 self.assertEqual(set(cd.suite_tag_parts), {'foo', 'bar'})
82 cd = ControlData({}, 'filename')
83 self.assertEqual(cd.suite_tag_parts, [])
99 cd = control_data.parse_control(self.control_tmp.name, True)
100 self.assertEqual(cd.author, "Author")
101 self.assertEqual(cd.dependencies, set(['console', 'power']))
102 self.assertEqual(cd.doc, "doc stuff")
103 self.assertEqual(cd.experimental, False)
104 self.assertEqual(cd.name, "nAmE")
105 self.assertEqual(cd.run_verify, False)
106 self.assertEqual(cd.sync_count, 2)
107 self.assertEqual(cd.time, "short")
108 self.assertEqual(cd.test_class, "kernel")
109 self.assertEqual(cd.test_category, "stress")
110 self.assertEqual(cd.test_type, "client")
111 self.assertEqual(cd.require_ssp, False)
112 self.assertEqual(cd.attributes, set(["suite:smoke", "suite:bvt"]))
113 self.assertEqual(cd.suite, "bvt,smoke,suite-listed-only-in-suite-line")
129 cd = control_data.parse_control(self.control_tmp.name, True)
130 self.assertEqual(cd.author, "Author")
131 self.assertEqual(cd.dependencies, set(['console', 'power']))
132 self.assertEqual(cd.doc, "doc stuff")
133 self.assertEqual(cd.experimental, False)
134 self.assertEqual(cd.name, "nAmE")
135 self.assertEqual(cd.run_verify, False)
136 self.assertEqual(cd.sync_count, 2)
137 self.assertEqual(cd.time, "short")
138 self.assertEqual(cd.test_class, "kernel")
139 self.assertEqual(cd.test_category, "stress")
140 self.assertEqual(cd.test_type, "client")
141 self.assertEqual(cd.require_ssp, False)
142 self.assertEqual(cd.attributes, set(["suite:smoke", "suite:bvt"]))
143 self.assertEqual(cd.suite, "bvt,smoke,suite-listed-only-in-suite-line")
144 self.assertEqual(cd.max_result_size_KB, 20000)
195 cd = control_data.parse_control(self.control_tmp.name, True)
196 self.verify_bug_template(cd.bug_template)
204 cd = control_data.parse_control(self.control_tmp.name, True)
205 self.verify_bug_template(cd.bug_template)
213 cd = control_data.parse_control(self.control_tmp.name, True)
214 self.assertFalse(hasattr(cd, 'bug_template'))
228 cd = ControlData({}, 'filename')
229 cd._set_bool('foo', 'False')
230 self.assertEqual(cd.foo, False)
231 cd._set_bool('foo', True)
232 self.assertEqual(cd.foo, True)
233 cd._set_bool('foo', 'FALSE')
234 self.assertEqual(cd.foo, False)
235 cd._set_bool('foo', 'true')
236 self.assertEqual(cd.foo, True)
237 self.assertRaises(ValueError, cd._set_bool, 'foo', '')
238 self.assertRaises(ValueError, cd._set_bool, 'foo', 1)
239 self.assertRaises(ValueError, cd._set_bool, 'foo', [])
240 self.assertRaises(ValueError, cd._set_bool, 'foo', None)
244 cd = ControlData({}, 'filename')
245 cd._set_int('foo', 0)
246 self.assertEqual(cd.foo, 0)
247 cd._set_int('foo', '0')
248 self.assertEqual(cd.foo, 0)
249 cd._set_int('foo', '-1', min=-2, max=10)
250 self.assertEqual(cd.foo, -1)
251 self.assertRaises(ValueError, cd._set_int, 'foo', 0, min=1)
252 self.assertRaises(ValueError, cd._set_int, 'foo', 1, max=0)
253 self.assertRaises(ValueError, cd._set_int, 'foo', 'x')
254 self.assertRaises(ValueError, cd._set_int, 'foo', '')
255 self.assertRaises(TypeError, cd._set_int, 'foo', None)
259 cd = ControlData({}, 'filename')
260 cd._set_set('foo', 'a')
261 self.assertEqual(cd.foo, set(['a']))
262 cd._set_set('foo', 'a,b,c')
263 self.assertEqual(cd.foo, set(['a', 'b', 'c']))
264 cd._set_set('foo', ' a , b , c ')
265 self.assertEqual(cd.foo, set(['a', 'b', 'c']))
266 cd._set_set('foo', None)
267 self.assertEqual(cd.foo, set(['None']))
271 cd = ControlData({}, 'filename')
272 cd._set_string('foo', 'a')
273 self.assertEqual(cd.foo, 'a')
274 cd._set_string('foo', 'b')
275 self.assertEqual(cd.foo, 'b')
276 cd._set_string('foo', 'B')
277 self.assertEqual(cd.foo, 'B')
278 cd._set_string('foo', 1)
279 self.assertEqual(cd.foo, '1')
280 cd._set_string('foo', None)
281 self.assertEqual(cd.foo, 'None')
282 cd._set_string('foo', [])
283 self.assertEqual(cd.foo, '[]')
288 cd = ControlData({}, 'filename')
289 cd._set_option('foo', 'a', options)
290 self.assertEqual(cd.foo, 'a')
291 cd._set_option('foo', 'b', options)
292 self.assertEqual(cd.foo, 'b')
293 cd._set_option('foo', 'B', options)
294 self.assertEqual(cd.foo, 'B')
295 self.assertRaises(ValueError, cd._set_option,
297 self.assertRaises(ValueError, cd._set_option,
299 self.assertRaises(ValueError, cd._set_option,
301 self.assertRaises(ValueError, cd._set_option,
306 cd = ControlData({}, 'filename')
307 cd.set_attributes('suite:bvt')
308 self.assertEqual(cd.attributes, set(['suite:bvt']))