| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Unit tests for trychange.py.""" | 6 """Unit tests for trychange.py.""" |
| 7 | 7 |
| 8 import unittest | 8 import unittest |
| 9 | 9 |
| 10 # Local imports | 10 # Local imports |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class TryChangeUnittest(TryChangeTestsBase): | 21 class TryChangeUnittest(TryChangeTestsBase): |
| 22 """General trychange.py tests.""" | 22 """General trychange.py tests.""" |
| 23 def testMembersChanged(self): | 23 def testMembersChanged(self): |
| 24 members = [ | 24 members = [ |
| 25 'EscapeDot', 'GIT', 'GetSourceRoot', | 25 'EscapeDot', 'GIT', 'GetSourceRoot', |
| 26 'GetTryServerSettings', 'GuessVCS', | 26 'GetTryServerSettings', 'GuessVCS', |
| 27 'HELP_STRING', 'InvalidScript', 'NoTryServerAccess', 'PathDifference', | 27 'HELP_STRING', 'InvalidScript', 'NoTryServerAccess', 'PathDifference', |
| 28 'RunCommand', 'SCM', 'SVN', 'TryChange', 'USAGE', | 28 'RunCommand', 'SCM', 'SVN', 'TryChange', 'USAGE', |
| 29 'datetime', 'gcl', 'gclient', 'gclient_scm', 'getpass', 'logging', | 29 'datetime', 'gcl', 'gclient', 'gclient_scm', 'getpass', 'logging', |
| 30 'optparse', 'os', 'shutil', 'socket', 'sys', 'tempfile', 'traceback', | 30 'optparse', 'os', 'shutil', 'socket', 'sys', 'tempfile', 'traceback', |
| 31 'upload', 'urllib', | 31 'upload', 'urllib', 'subprocess', |
| 32 ] | 32 ] |
| 33 # If this test fails, you should add the relevant test. | 33 # If this test fails, you should add the relevant test. |
| 34 self.compareMembers(trychange, members) | 34 self.compareMembers(trychange, members) |
| 35 | 35 |
| 36 | 36 |
| 37 class SVNUnittest(TryChangeTestsBase): | 37 class SVNUnittest(TryChangeTestsBase): |
| 38 """trychange.SVN tests.""" | 38 """trychange.SVN tests.""" |
| 39 def testMembersChanged(self): | 39 def testMembersChanged(self): |
| 40 members = [ | 40 members = [ |
| 41 'GenerateDiff', 'ProcessOptions', 'options' | 41 'GenerateDiff', 'ProcessOptions', 'options' |
| 42 ] | 42 ] |
| 43 # If this test fails, you should add the relevant test. | 43 # If this test fails, you should add the relevant test. |
| 44 self.compareMembers(trychange.SVN(None), members) | 44 self.compareMembers(trychange.SVN(None), members) |
| 45 | 45 |
| 46 | 46 |
| 47 class GITUnittest(TryChangeTestsBase): | 47 class GITUnittest(TryChangeTestsBase): |
| 48 """trychange.GIT tests.""" | 48 """trychange.GIT tests.""" |
| 49 def testMembersChanged(self): | 49 def testMembersChanged(self): |
| 50 members = [ | 50 members = [ |
| 51 'GenerateDiff', 'GetEmail', 'GetPatchName', 'ProcessOptions', 'options' | 51 'GenerateDiff', 'GetEmail', 'GetPatchName', 'ProcessOptions', 'options' |
| 52 ] | 52 ] |
| 53 # If this test fails, you should add the relevant test. | 53 # If this test fails, you should add the relevant test. |
| 54 self.compareMembers(trychange.GIT(None), members) | 54 self.compareMembers(trychange.GIT(None), members) |
| 55 | 55 |
| 56 | 56 |
| 57 if __name__ == '__main__': | 57 if __name__ == '__main__': |
| 58 unittest.main() | 58 unittest.main() |
| OLD | NEW |