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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/system/outputcapture.py

Issue 2237003005: Remove unused class OutputCaptureTestCaseBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009, Google Inc. All rights reserved. 1 # Copyright (c) 2009, Google Inc. All rights reserved.
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 are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 testassert = testcase.assertMultiLineEqual 94 testassert = testcase.assertMultiLineEqual
95 else: 95 else:
96 testassert = testcase.assertEqual 96 testassert = testcase.assertEqual
97 97
98 testassert(stdout_string, expected_stdout) 98 testassert(stdout_string, expected_stdout)
99 testassert(stderr_string, expected_stderr) 99 testassert(stderr_string, expected_stderr)
100 if expected_logs is not None: 100 if expected_logs is not None:
101 testassert(logs_string, expected_logs) 101 testassert(logs_string, expected_logs)
102 # This is a little strange, but I don't know where else to return this i nformation. 102 # This is a little strange, but I don't know where else to return this i nformation.
103 return return_value 103 return return_value
104
105
106 class OutputCaptureTestCaseBase(unittest.TestCase):
107 maxDiff = None
108
109 def setUp(self):
110 unittest.TestCase.setUp(self)
111 self.output_capture = OutputCapture()
112 (self.__captured_stdout, self.__captured_stderr) = self.output_capture.c apture_output()
113
114 def tearDown(self):
115 del self.__captured_stdout
116 del self.__captured_stderr
117 self.output_capture.restore_output()
118 unittest.TestCase.tearDown(self)
119
120 def assertStdout(self, expected_stdout):
121 self.assertEqual(expected_stdout, self.__captured_stdout.getvalue())
122
123 def assertStderr(self, expected_stderr):
124 self.assertEqual(expected_stderr, self.__captured_stderr.getvalue())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698