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

Side by Side Diff: packages/infra_libs/infra_libs/logs/test/logs_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 copy 5 import copy
6 import logging 6 import logging
7 import sys 7 import sys
8 import unittest 8 import unittest
9 9
10 import mock 10 import mock
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 def test_from_main_package(self): 55 def test_from_main_package(self):
56 sys.argv = ['/foo/bar/__main__.py', '--args'] 56 sys.argv = ['/foo/bar/__main__.py', '--args']
57 sys.modules['__main__'].__package__ = 'foo.bar.program' 57 sys.modules['__main__'].__package__ = 'foo.bar.program'
58 self.assertEquals('program', logs.default_program_name()) 58 self.assertEquals('program', logs.default_program_name())
59 59
60 def test_from_argv_when_main_package_is_none(self): 60 def test_from_argv_when_main_package_is_none(self):
61 sys.argv = ['/foo/bar/__main__.py', '--args'] 61 sys.argv = ['/foo/bar/__main__.py', '--args']
62 sys.modules['__main__'].__package__ = None 62 sys.modules['__main__'].__package__ = None
63 self.assertEquals('__main__.py', logs.default_program_name()) 63 self.assertEquals('__main__.py', logs.default_program_name())
OLDNEW
« no previous file with comments | « packages/infra_libs/infra_libs/logs/test/__init__.py ('k') | packages/infra_libs/infra_libs/memoize.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698