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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/style/checker_unittest.py

Issue 2137803002: Remove unnecessary pass statements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 # -*- coding: utf-8; -*- 1 # -*- coding: utf-8; -*-
2 # 2 #
3 # Copyright (C) 2009 Google Inc. All rights reserved. 3 # Copyright (C) 2009 Google Inc. All rights reserved.
4 # Copyright (C) 2009 Torch Mobile Inc. 4 # Copyright (C) 2009 Torch Mobile Inc.
5 # Copyright (C) 2009 Apple Inc. All rights reserved. 5 # Copyright (C) 2009 Apple Inc. All rights reserved.
6 # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) 6 # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
7 # 7 #
8 # Redistribution and use in source and binary forms, with or without 8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions are 9 # modification, are permitted provided that the following conditions are
10 # met: 10 # met:
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 # We provide this function so the caller can pass it to the 713 # We provide this function so the caller can pass it to the
714 # StyleProcessor constructor. This lets us assert the equality of 714 # StyleProcessor constructor. This lets us assert the equality of
715 # the DefaultStyleErrorHandler instance generated by the process() 715 # the DefaultStyleErrorHandler instance generated by the process()
716 # method with an expected instance. 716 # method with an expected instance.
717 pass 717 pass
718 718
719 def _swallow_stderr_message(self, message): 719 def _swallow_stderr_message(self, message):
720 """Swallow a message passed to stderr.write().""" 720 """Swallow a message passed to stderr.write()."""
721 # This is a mock stderr.write() for passing to the constructor 721 # This is a mock stderr.write() for passing to the constructor
722 # of the StyleProcessorConfiguration class. 722 # of the StyleProcessorConfiguration class.
723 pass
724 723
725 def _create_carriage_checker_class(self): 724 def _create_carriage_checker_class(self):
726 725
727 # Create a reference to self with a new name so its name does not 726 # Create a reference to self with a new name so its name does not
728 # conflict with the self introduced below. 727 # conflict with the self introduced below.
729 test_case = self 728 test_case = self
730 729
731 class MockCarriageChecker(object): 730 class MockCarriageChecker(object):
732 731
733 """A mock carriage-return checker.""" 732 """A mock carriage-return checker."""
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 """Test that carriage returns aren't stripped from files that are allowe d to contain them.""" 811 """Test that carriage returns aren't stripped from files that are allowe d to contain them."""
813 file_path = 'carriage_returns_allowed.txt' 812 file_path = 'carriage_returns_allowed.txt'
814 lines = ['line1\r', 'line2\r'] 813 lines = ['line1\r', 'line2\r']
815 line_numbers = [100] 814 line_numbers = [100]
816 self._processor.process(lines=lines, 815 self._processor.process(lines=lines,
817 file_path=file_path, 816 file_path=file_path,
818 line_numbers=line_numbers) 817 line_numbers=line_numbers)
819 # The carriage return checker should never have been invoked, and so 818 # The carriage return checker should never have been invoked, and so
820 # should not have saved off any lines. 819 # should not have saved off any lines.
821 self.assertFalse(hasattr(self.carriage_checker, 'lines')) 820 self.assertFalse(hasattr(self.carriage_checker, 'lines'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698