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

Side by Side Diff: Tools/Scripts/webkitpy/common/system/user_unittest.py

Issue 633503003: [webkitpy] Remove leftover changelog editor methods from User. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/Scripts/webkitpy/common/system/user_mock.py ('k') | 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) 2010 Research in Motion Ltd. All rights reserved. 1 # Copyright (C) 2010 Research in Motion Ltd. 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 for test_case in test_cases: 119 for test_case in test_cases:
120 expected, inputs = test_case 120 expected, inputs = test_case
121 121
122 def mock_raw_input(message): 122 def mock_raw_input(message):
123 self.assertEqual(expected[0], message) 123 self.assertEqual(expected[0], message)
124 return inputs[1] 124 return inputs[1]
125 125
126 result = User().confirm(default=inputs[0], 126 result = User().confirm(default=inputs[0],
127 raw_input=mock_raw_input) 127 raw_input=mock_raw_input)
128 self.assertEqual(expected[1], result) 128 self.assertEqual(expected[1], result)
129
130 def test_warn_if_application_is_xcode(self):
131 output = OutputCapture()
132 user = User()
133 output.assert_outputs(self, user._warn_if_application_is_xcode, ["TextMa te"])
134 output.assert_outputs(self, user._warn_if_application_is_xcode, ["/Appli cations/TextMate.app"])
135 output.assert_outputs(self, user._warn_if_application_is_xcode, ["XCode" ]) # case sensitive matching
136
137 xcode_warning = "Instead of using Xcode.app, consider using EDITOR=\"xed --wait\".\n"
138 output.assert_outputs(self, user._warn_if_application_is_xcode, ["Xcode" ], expected_stdout=xcode_warning)
139 output.assert_outputs(self, user._warn_if_application_is_xcode, ["/Devel oper/Applications/Xcode.app"], expected_stdout=xcode_warning)
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/common/system/user_mock.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698