Beispiel #1
0
 def test_persistance_seq_error(self):
     result_set = test.run([make_seqtc([
         ('one', self.flip_n_switch(0)),
         ('two', self.allways_raise())],
         name = 'seq')])
     read_result_set = util.withtmp(
         lambda f: pickle.dump(result_set, f),
         lambda f: pickle.load(f))
     
     for i in range(len(result_set)):
         self.assertEqual(result_set[i].status, read_result_set[i].status)
         self.assertEqual(result_set[i].testcase_name, read_result_set[i].testcase_name)
         for j in range(len(result_set[i].sub_results)):
             self.assertEqual(result_set[i].sub_results[j].status, read_result_set[i].sub_results[j].status)
             self.assertEqual(result_set[i].sub_results[j].testcase_name, read_result_set[i].sub_results[j].testcase_name)
Beispiel #2
0
 def test_persistance_one_pass(self):
     result_set = test.run([make_tc(self.allways_pass(), name='tc-name')])
     read_result_set = util.withtmp(
         lambda f: pickle.dump(result_set, f),
         lambda f: pickle.load(f))
     self.assertEqual(list(map(vars,result_set)), list(map(vars,read_result_set)))