Example #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)
Example #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)
Example #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})
Example #4
0
 def test_initializeSkiaGoldAttributes_explicitGitRevision(self):
     args = createSkiaGoldArgs(git_revision='a')
     sgp = gold_utils.SkiaGoldProperties(args)
     self.verifySkiaGoldProperties(sgp, {'git_revision': 'a'})
Example #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})
Example #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})
Example #7
0
 def test_initializeSkiaGoldAttributes_unsetLocal(self):
     args = createSkiaGoldArgs()
     sgp = gold_utils.SkiaGoldProperties(args)
     self.verifySkiaGoldProperties(sgp, {})
Example #8
0
 def testGetGitRevision_noExplicitOnBot(self):
     args = createSkiaGoldArgs(local_pixel_tests=False)
     sgp = gold_utils.SkiaGoldProperties(args)
     with self.assertRaises(RuntimeError):
         _ = sgp.git_revision
Example #9
0
 def testGetGitRevision_revisionSet(self):
     args = createSkiaGoldArgs(git_revision='a')
     sgp = gold_utils.SkiaGoldProperties(args)
     self.assertEqual(sgp.git_revision, 'a')
Example #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)