blob: 99b96950cd0aada776c709442f9f7408cee8f917 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/usr/bin/env python
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
import os
import sys
here = os.path.realpath(__file__)
testdata_path = os.path.normpath(os.path.join(here, '..', 'testdata'))
import upload_screenshots
class UploadTests(unittest.TestCase):
def test_find_screenshots(self):
screenshots = upload_screenshots.find_screenshots(
testdata_path,
os.path.join(testdata_path, 'translation_expectations.pyl'))
self.assertEquals(2, len(screenshots))
self.assertEquals(
os.path.join(testdata_path, 'test_grd', 'IDS_TEST_STRING1.png'),
screenshots[0])
self.assertEquals(
os.path.join(testdata_path, 'part_grdp', 'IDS_PART_STRING2.png'),
screenshots[1])
if __name__ == '__main__':
unittest.main()
|