Changeset 107293 in webkit
- Timestamp:
- Feb 9, 2012 2:33:16 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r107286 r107293 1 2012-02-09 Dirk Pranke <dpranke@chromium.org> 2 3 some tests in webkitpy are being run three times 4 https://bugs.webkit.org/show_bug.cgi?id=78283 5 6 Reviewed by Ryosuke Niwa. 7 8 It turns out that if you import a class derived from 9 unittest.TestCase as a base name (e.g., from ... import ChangeLogTest), 10 the unittest framework treats it as if the class was defined in 11 the file (as well in the original file). This led us to running 12 the tests in ChangeLogTest three times. 13 14 * Scripts/webkitpy/tool/steps/preparechangelog_unittest.py: 15 (PrepareChangeLogTest): 16 * Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py: 17 (_assert_message_for_revert_output): 18 1 19 2012-02-09 Adam Barth <abarth@webkit.org> 2 20 -
trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py
r91724 r107293 30 30 import unittest 31 31 32 from webkitpy.common.checkout.changelog_unittest import ChangeLogTest 32 # Do not import changelog_unittest.ChangeLogTest directly as that will cause it to be run again. 33 from webkitpy.common.checkout import changelog_unittest 34 33 35 from webkitpy.common.system.outputcapture import OutputCapture 34 36 from webkitpy.tool.mocktool import MockOptions, MockTool … … 36 38 37 39 38 class PrepareChangeLogTest( ChangeLogTest):40 class PrepareChangeLogTest(changelog_unittest.ChangeLogTest): 39 41 def test_ensure_bug_url(self): 40 42 capture = OutputCapture() -
trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py
r107136 r107293 32 32 import unittest 33 33 34 # Do not import changelog_unittest.ChangeLogTest directly as that will cause it to be run again. 35 from webkitpy.common.checkout import changelog_unittest 36 34 37 from webkitpy.common.checkout.changelog import ChangeLog 35 from webkitpy.common.checkout.changelog_unittest import ChangeLogTest36 38 from webkitpy.tool.steps.preparechangelogforrevert import * 37 39 … … 108 110 109 111 def _assert_message_for_revert_output(self, args, expected_entry): 110 changelog_contents = u"%s\n%s" % ( ChangeLogTest._new_entry_boilerplate,ChangeLogTest._example_changelog)112 changelog_contents = u"%s\n%s" % (changelog_unittest.ChangeLogTest._new_entry_boilerplate, changelog_unittest.ChangeLogTest._example_changelog) 111 113 changelog_path = self._write_tmp_file_with_contents(changelog_contents.encode("utf-8")) 112 114 changelog = ChangeLog(changelog_path)
Note: See TracChangeset
for help on using the changeset viewer.