def test_initializeSkiaGoldAttributes_tryjobMissingBuildbucket(self): args = createSkiaGoldArgs(git_revision='a', gerrit_issue=1, gerrit_patchset=2) with self.assertRaises(RuntimeError): gold_utils.SkiaGoldProperties(args)
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)
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})
def test_initializeSkiaGoldAttributes_explicitGitRevision(self): args = createSkiaGoldArgs(git_revision='a') sgp = gold_utils.SkiaGoldProperties(args) self.verifySkiaGoldProperties(sgp, {'git_revision': 'a'})
def test_initializeSkiaGoldAttributes_explicitNonLocal(self): args = createSkiaGoldArgs(local_pixel_tests=False) sgp = gold_utils.SkiaGoldProperties(args) self.verifySkiaGoldProperties(sgp, {'local_pixel_tests': False})
def test_initializeSkiaGoldAttributes_explicitNoLuciAuth(self): args = createSkiaGoldArgs(no_luci_auth=True) sgp = gold_utils.SkiaGoldProperties(args) self.verifySkiaGoldProperties(sgp, {'no_luci_auth': True})
def test_initializeSkiaGoldAttributes_unsetLocal(self): args = createSkiaGoldArgs() sgp = gold_utils.SkiaGoldProperties(args) self.verifySkiaGoldProperties(sgp, {})
def testGetGitRevision_noExplicitOnBot(self): args = createSkiaGoldArgs(local_pixel_tests=False) sgp = gold_utils.SkiaGoldProperties(args) with self.assertRaises(RuntimeError): _ = sgp.git_revision
def testGetGitRevision_revisionSet(self): args = createSkiaGoldArgs(git_revision='a') sgp = gold_utils.SkiaGoldProperties(args) self.assertEqual(sgp.git_revision, 'a')
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)