コード例 #1
0
 def test_determine_factor_matching_platform(self):
     erjc.SYS_PLATFORM = "myplatform"
     erjc.PLATFORM_TASK_FACTOR_OVERRIDES = {"mymachine": self.task_factors}
     factor = erjc.determine_factor(self.mytask, "myvariant", 1)
     self.assertEqual(self.mytask_factor, factor)
     factor = erjc.determine_factor(self.regex, "myvariant", 1)
     self.assertEqual(self.regex_factor, factor)
コード例 #2
0
 def test_determine_factor_matching_machine(self):
     erjc.PLATFORM_MACHINE = "mymachine"
     erjc.MACHINE_TASK_FACTOR_OVERRIDES = {"mymachine": self.task_factors}
     factor = erjc.determine_factor(self.mytask, "myvariant", 1)
     self.assertEqual(self.mytask_factor, factor)
     factor = erjc.determine_factor(self.regex, "myvariant", 1)
     self.assertEqual(self.regex_factor, factor)
コード例 #3
0
 def test_determine_factor_matching_variant(self):
     under_test.VARIANT_TASK_FACTOR_OVERRIDES = {
         "myvariant": self.task_factors
     }
     factor = under_test.determine_factor(self.mytask, "myvariant",
                                          "mydistro", 1)
     self.assertEqual(self.mytask_factor, factor)
     factor = under_test.determine_factor(self.regex, "myvariant",
                                          "mydistro", 1)
     self.assertEqual(self.regex_factor, factor)
コード例 #4
0
 def test_determine_factor_matching_variant(self):
     erjc.VARIANT_TASK_FACTOR_OVERRIDES = {"myvariant": self.task_factors}
     factor = erjc.determine_factor(self.mytask, "myvariant", 1)
     self.assertEqual(self.mytask_factor, factor)
     factor = erjc.determine_factor(self.regex, "myvariant", 1)
     self.assertEqual(self.regex_factor, factor)