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

Side by Side Diff: packages/infra_libs/infra_libs/ts_mon/test/config_test.py

Issue 2179853002: Added packages/infra_libs as the first Python package. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Final rebase (no actual changes) Created 4 years, 4 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import argparse 5 import argparse
6 import json 6 import json
7 import os 7 import os
8 import requests 8 import requests
9 import tempfile 9 import tempfile
10 import unittest 10 import unittest
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 with infra_libs.temporary_directory() as temp_dir: 384 with infra_libs.temporary_directory() as temp_dir:
385 filename = os.path.join(temp_dir, 'config') 385 filename = os.path.join(temp_dir, 'config')
386 with open(filename, 'w') as fh: 386 with open(filename, 'w') as fh:
387 fh.write('not a json file') 387 fh.write('not a json file')
388 388
389 with self.assertRaises(ValueError): 389 with self.assertRaises(ValueError):
390 config.load_machine_config(filename) 390 config.load_machine_config(filename)
391 391
392 def test_load_machine_config_not_exists(self): 392 def test_load_machine_config_not_exists(self):
393 self.assertEquals({}, config.load_machine_config('does not exist')) 393 self.assertEquals({}, config.load_machine_config('does not exist'))
OLDNEW
« no previous file with comments | « packages/infra_libs/infra_libs/ts_mon/test/__init__.py ('k') | packages/infra_libs/infra_libs/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698