OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 patch.py.""" | 6 """Unit tests for patch.py.""" |
7 | 7 |
8 import logging | 8 import logging |
9 import os | 9 import os |
10 import sys | 10 import sys |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 diff = ( | 505 diff = ( |
506 'diff --git a/natsort_test.py b/natsort_test.py\n' | 506 'diff --git a/natsort_test.py b/natsort_test.py\n' |
507 'new file mode 100755\n' | 507 'new file mode 100755\n' |
508 '--- /dev/null\n' | 508 '--- /dev/null\n' |
509 '+++ b/natsort_test.py\n' | 509 '+++ b/natsort_test.py\n' |
510 '@@ -0,0 +1,1 @@\n' | 510 '@@ -0,0 +1,1 @@\n' |
511 '+#!/usr/bin/env python\n') | 511 '+#!/usr/bin/env python\n') |
512 self.assertEquals( | 512 self.assertEquals( |
513 [('svn:executable', '*')], | 513 [('svn:executable', '*')], |
514 patch.FilePatchDiff('natsort_test.py', diff, []).svn_properties) | 514 patch.FilePatchDiff('natsort_test.py', diff, []).svn_properties) |
| 515 diff = ( |
| 516 'diff --git a/natsort_test.py b/natsort_test.py\n' |
| 517 'new file mode 100644\n' |
| 518 '--- /dev/null\n' |
| 519 '+++ b/natsort_test.py\n' |
| 520 '@@ -0,0 +1,1 @@\n' |
| 521 '+#!/usr/bin/env python\n') |
| 522 self.assertEquals( |
| 523 [], patch.FilePatchDiff('natsort_test.py', diff, []).svn_properties) |
515 | 524 |
516 | 525 |
517 if __name__ == '__main__': | 526 if __name__ == '__main__': |
518 logging.basicConfig(level= | 527 logging.basicConfig(level= |
519 [logging.WARNING, logging.INFO, logging.DEBUG][ | 528 [logging.WARNING, logging.INFO, logging.DEBUG][ |
520 min(2, sys.argv.count('-v'))]) | 529 min(2, sys.argv.count('-v'))]) |
521 unittest.main() | 530 unittest.main() |
OLD | NEW |