示例#1
0
 def test_initializeSkiaGoldAttributes_tryjobMissingBuildbucket(self):
     args = createSkiaGoldArgs(git_revision='a',
                               gerrit_issue=1,
                               gerrit_patchset=2)
     with self.assertRaises(RuntimeError):
         gold_utils.SkiaGoldProperties(args)
示例#2
0
 def testLocalPixelTests_determineTrue(self):
     args = createSkiaGoldArgs()
     sgp = gold_utils.SkiaGoldProperties(args)
     with mock.patch.dict(os.environ, {}, clear=True):
         self.assertTrue(sgp.local_pixel_tests)
示例#3
0
 def test_initializeSkiaGoldAttributes_bypassExplicitTrue(self):
     args = createSkiaGoldArgs(bypass_skia_gold_functionality=True)
     sgp = gold_utils.SkiaGoldProperties(args)
     self.verifySkiaGoldProperties(sgp,
                                   {'bypass_skia_gold_functionality': True})
示例#4
0
 def test_initializeSkiaGoldAttributes_explicitGitRevision(self):
     args = createSkiaGoldArgs(git_revision='a')
     sgp = gold_utils.SkiaGoldProperties(args)
     self.verifySkiaGoldProperties(sgp, {'git_revision': 'a'})
示例#5
0
 def test_initializeSkiaGoldAttributes_explicitNonLocal(self):
     args = createSkiaGoldArgs(local_pixel_tests=False)
     sgp = gold_utils.SkiaGoldProperties(args)
     self.verifySkiaGoldProperties(sgp, {'local_pixel_tests': False})
示例#6
0
 def test_initializeSkiaGoldAttributes_explicitNoLuciAuth(self):
     args = createSkiaGoldArgs(no_luci_auth=True)
     sgp = gold_utils.SkiaGoldProperties(args)
     self.verifySkiaGoldProperties(sgp, {'no_luci_auth': True})
示例#7
0
 def test_initializeSkiaGoldAttributes_unsetLocal(self):
     args = createSkiaGoldArgs()
     sgp = gold_utils.SkiaGoldProperties(args)
     self.verifySkiaGoldProperties(sgp, {})
示例#8
0
 def testGetGitRevision_noExplicitOnBot(self):
     args = createSkiaGoldArgs(local_pixel_tests=False)
     sgp = gold_utils.SkiaGoldProperties(args)
     with self.assertRaises(RuntimeError):
         _ = sgp.git_revision
示例#9
0
 def testGetGitRevision_revisionSet(self):
     args = createSkiaGoldArgs(git_revision='a')
     sgp = gold_utils.SkiaGoldProperties(args)
     self.assertEqual(sgp.git_revision, 'a')
示例#10
0
 def testIsTryjobRun_noIssue(self):
     args = createSkiaGoldArgs()
     sgp = gold_utils.SkiaGoldProperties(args)
     self.assertFalse(sgp.IsTryjobRun())
 def _initializeSkiaGoldAttributes(self, args):
   self._skia_gold_properties = gold_utils.SkiaGoldProperties(args)