Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/python | |
| 2 | |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 import os | |
| 8 import random | |
| 9 import unittest | |
| 10 from media_test_matrix import MediaTestMatrix | |
| 11 | |
| 12 | |
| 13 class MediaTestMatrixTest(unittest.TestCase): | |
| 14 """Unit test for MediaTestMatrix class.""" | |
| 15 | |
| 16 def testGenerateAllMediaInfos(self): | |
| 17 data_file = os.path.join('..', 'data', 'media', 'media_matrix_data.csv') | |
|
Nirnimesh
2011/03/17 02:32:00
use self.DataDir()
imasaki1
2011/03/17 23:29:18
Done.
| |
| 18 matrix = MediaTestMatrix() | |
| 19 matrix.ReadData(data_file) | |
| 20 media_test_matrix_list = matrix.GenerateAllMediaInfosInCompactForm(True) | |
| 21 self.assertEqual(len(media_test_matrix_list), 240) | |
| 22 mobile_test_info = MediaTestMatrix.LookForMediaInfoByNickName( | |
| 23 media_test_matrix_list, "mobile0.webm") | |
| 24 self.assertEqual(mobile_test_info[1], "mobile0.webm") | |
| 25 | |
|
dennis_jeffrey
2011/03/17 17:13:36
Don't we need more unit tests? For example, funct
imasaki1
2011/03/17 23:29:18
Done.
| |
| 26 if __name__ == '__main__': | |
| 27 unittest.main() | |
| OLD | NEW |