Patchwork D1573: run-tests: simplify by using dict.pop() with default

login
register
mail settings
Submitter phabricator
Date Dec. 1, 2017, 10:17 p.m.
Message ID <differential-rev-PHID-DREV-5po6pxeormz3dokvguxk-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25871/
State Superseded
Headers show

Comments

phabricator - Dec. 1, 2017, 10:17 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1573

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1207,9 +1207,7 @@ 
 
     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)