示例#1
0
    def testGetSDKVersion(self):
        """correctly parses README to find SDK version."""
        expected_version = (16, 196)
        with open(os.path.join(self.tempdir, 'README'), 'w') as out:
            out.write('Version: %s\n' % expected_version[0])
            out.write('Chrome Revision: %s\n' % expected_version[1])

        version = getos.GetSDKVersion()
        self.assertEqual(version, expected_version)
示例#2
0
    def testGetSDKVersion(self):
        """correctly parses README to find SDK version."""
        expected_version = (16, 100, 'f00baacabba6e-refs/heads/master@{#100}')
        with open(os.path.join(self.tempdir, 'README'), 'w') as out:
            out.write('Version: %d\n' % expected_version[0])
            out.write('Chrome Revision: %d\n' % expected_version[1])
            out.write('Chrome Commit Position: %s\n' % expected_version[2])

        version = getos.GetSDKVersion()
        self.assertEqual(version, expected_version)