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

login
register
mail settings
Submitter phabricator
Date Dec. 2, 2017, 3:11 a.m.
Message ID <2ef03e2b8c336bed7342e74c4f439d53@localhost.localdomain>
Download mbox | patch
Permalink /patch/25884/
State Not Applicable
Headers show

Comments

phabricator - Dec. 2, 2017, 3:11 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf12747de13ea: run-tests: simplify by using dict.pop() with default (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1573?vs=4063&id=4076

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

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit, yuja
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
@@ -1218,9 +1218,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)