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

Unified Diff: Tools/Scripts/webkitpy/test/skip.py

Issue 654063002: Switch webkitpy to use the typ test framework (delete webkitpy.test). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix typo for bot_test_expectations 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/Scripts/webkitpy/test/runner_unittest.py ('k') | Tools/Scripts/webkitpy/test/skip_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/test/skip.py
diff --git a/Tools/Scripts/webkitpy/test/skip.py b/Tools/Scripts/webkitpy/test/skip.py
deleted file mode 100644
index 8587d56cba80ea93e0647b1955b492a484f41826..0000000000000000000000000000000000000000
--- a/Tools/Scripts/webkitpy/test/skip.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (C) 2010 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import logging
-
-_log = logging.getLogger(__name__)
-
-
-def skip_if(klass, condition, message=None, logger=None):
- """Makes all test_* methods in a given class no-ops if the given condition
- is False. Backported from Python 3.1+'s unittest.skipIf decorator."""
- if not logger:
- logger = _log
- if not condition:
- return klass
- for name in dir(klass):
- attr = getattr(klass, name)
- if not callable(attr):
- continue
- if not name.startswith('test_'):
- continue
- setattr(klass, name, _skipped_method(attr, message, logger))
- klass._printed_skipped_message = False
- return klass
-
-
-def _skipped_method(method, message, logger):
- def _skip(*args):
- if method.im_class._printed_skipped_message:
- return
- method.im_class._printed_skipped_message = True
- logger.info('Skipping %s.%s: %s' % (method.__module__, method.im_class.__name__, message))
- return _skip
« no previous file with comments | « Tools/Scripts/webkitpy/test/runner_unittest.py ('k') | Tools/Scripts/webkitpy/test/skip_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698