# HG changeset patch # User Martin von Zweigbergk <martinvonz@google.com> # Date 2017-12-01 20:27:28 # Node ID f12747de13ea635cbbb8245439ab805220cdab0e # Parent d8d06a930d6033df287589207c591fdb5ce2817f run-tests: simplify by using dict.pop() with default Differential Revision: https://phab.mercurial-scm.org/D1573 diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -1218,9 +1218,7 @@ class TTest(Test): def __init__(self, path, *args, **kwds): # accept an extra "case" parameter - case = None - if 'case' in kwds: - case = kwds.pop('case') + case = kwds.pop('case', None) self._case = case self._allcases = parsettestcases(path) super(TTest, self).__init__(path, *args, **kwds)