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

Side by Side Diff: sky/tools/webkitpy/common/system/logutils_unittest.py

Issue 639883003: Get test_webkitpy to actually run again. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 6 years, 1 month 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 (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) 1 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
(...skipping 28 matching lines...) Expand all
39 logger = logutils.get_logger(__file__) 39 logger = logutils.get_logger(__file__)
40 self.assertEqual(logger.name, "webkitpy.common.system.logutils_unittest" ) 40 self.assertEqual(logger.name, "webkitpy.common.system.logutils_unittest" )
41 41
42 def test_get_logger_not_in_webkitpy(self): 42 def test_get_logger_not_in_webkitpy(self):
43 # Temporarily change the working directory so that we 43 # Temporarily change the working directory so that we
44 # can test get_logger() for a path outside of webkitpy. 44 # can test get_logger() for a path outside of webkitpy.
45 working_directory = os.getcwd() 45 working_directory = os.getcwd()
46 root_dir = "/" 46 root_dir = "/"
47 os.chdir(root_dir) 47 os.chdir(root_dir)
48 48
49 logger = logutils.get_logger("/Tools/Scripts/test-webkitpy") 49 logger = logutils.get_logger("/tools/test-webkitpy")
50 self.assertEqual(logger.name, "test-webkitpy") 50 self.assertEqual(logger.name, "test-webkitpy")
51 51
52 logger = logutils.get_logger("/Tools/Scripts/test-webkitpy.py") 52 logger = logutils.get_logger("/tools/test-webkitpy.py")
53 self.assertEqual(logger.name, "test-webkitpy") 53 self.assertEqual(logger.name, "test-webkitpy")
54 54
55 os.chdir(working_directory) 55 os.chdir(working_directory)
56 56
57 57
58 class ConfigureLoggingTestBase(unittest.TestCase): 58 class ConfigureLoggingTestBase(unittest.TestCase):
59 59
60 """Base class for configure_logging() unit tests.""" 60 """Base class for configure_logging() unit tests."""
61 61
62 def _logging_level(self): 62 def _logging_level(self):
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 def _logging_level(self): 149 def _logging_level(self):
150 return self._level 150 return self._level
151 151
152 def test_logged_message(self): 152 def test_logged_message(self):
153 self._log.log(self._level, "test message") 153 self._log.log(self._level, "test message")
154 self._assert_log_messages(["test message\n"]) 154 self._assert_log_messages(["test message\n"])
155 155
156 def test_below_threshold_message(self): 156 def test_below_threshold_message(self):
157 self._log.log(self._level - 1, "test message") 157 self._log.log(self._level - 1, "test message")
158 self._assert_log_messages([]) 158 self._assert_log_messages([])
OLDNEW
« no previous file with comments | « sky/tools/webkitpy/common/system/filesystem_mock.py ('k') | sky/tools/webkitpy/common/webkit_finder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698