Exemple #1
0
 def testChromeVersionDecrementVersionIllegalUsage(self):
     chrome_version = apk_finder.ChromeVersion('68.0.3440.70')
     with self.assertRaises(AssertionError):
         chrome_version.GetDecrementedVersionNum(71)
     with self.assertRaises(AssertionError):
         chrome_version.GetDecrementedVersionNum(600)
Exemple #2
0
 def testChromeVersionDecrementVersionNormalUsage(self):
     chrome_version = apk_finder.ChromeVersion('68.0.3440.70')
     self.assertEqual('68.0.3440.64',
                      str(chrome_version.GetDecrementedVersionNum(6)))
     self.assertEqual('68.0.3440.0',
                      str(chrome_version.GetDecrementedVersionNum(70)))
Exemple #3
0
 def testChromeVersionConstructUsingFourInts(self):
     chrome_version = apk_finder.ChromeVersion(68, 0, 3440, 64)
     self.assertEqual(68, chrome_version.milestone)
     self.assertEqual(0, chrome_version.minor)
     self.assertEqual(3440, chrome_version.build)
     self.assertEqual(64, chrome_version.patch)
Exemple #4
0
 def testChromeVersionStringRepresentation(self):
     self.assertEqual('68.0.3440.64',
                      str(apk_finder.ChromeVersion(68, 0, 3440, 64)))
     self.assertEqual('68.0.3440.64',
                      str(apk_finder.ChromeVersion('68.0.3440.64')))
Exemple #5
0
 def testChromeVersionConstructUsingString(self):
     chrome_version = apk_finder.ChromeVersion('68.0.3440.64')
     self.assertEqual(68, chrome_version.milestone)
     self.assertEqual(0, chrome_version.minor)
     self.assertEqual(3440, chrome_version.build)
     self.assertEqual(64, chrome_version.patch)