Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: tools/json_comment_eater/json_comment_eater_test.py

Issue 1052993005: Slim down set of things updated by roll script (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/json_comment_eater/json_comment_eater.py ('k') | tools/msan/blacklist.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 from json_comment_eater import Nom
7 import unittest
8
9 class JsonCommentEaterTest(unittest.TestCase):
10 def _Load(self, test_name):
11 '''Loads the input and expected output for |test_name| as given by reading
12 in |test_name|.json and |test_name|_expected.json, and returns the string
13 contents as a tuple in that order.
14 '''
15 def read(file_name):
16 with open(file_name, 'r') as f:
17 return f.read()
18 return [read(pattern % test_name)
19 for pattern in ('%s.json', '%s_expected.json')]
20
21 def testEverything(self):
22 json, expected_json = self._Load('everything')
23 self.assertEqual(expected_json, Nom(json))
24
25 if __name__ == '__main__':
26 unittest.main()
OLDNEW
« no previous file with comments | « tools/json_comment_eater/json_comment_eater.py ('k') | tools/msan/blacklist.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698