From patchwork Wed Mar 12 17:40:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [14, of, 18, helps-py3] test-filelog: move from dict() construction to {} literals From: Augie Fackler X-Patchwork-Id: 3927 Message-Id: <2761a791b113b84060b2.1394646048@augie-macbookair> To: mercurial-devel@selenic.com Date: Wed, 12 Mar 2014 13:40:48 -0400 # HG changeset patch # User Augie Fackler # Date 1394644862 14400 # Wed Mar 12 13:21:02 2014 -0400 # Node ID 2761a791b113b84060b2df7bf25407f759293992 # Parent 6cb419dd3703ed59fc03c3996916e87a880a4f02 test-filelog: move from dict() construction to {} literals The latter are both faster and more consistent across Python 2 and 3. diff --git a/tests/test-filelog.py b/tests/test-filelog.py --- a/tests/test-filelog.py +++ b/tests/test-filelog.py @@ -13,7 +13,7 @@ def addrev(text, renamed=False): if renamed: # data doesn't matter. Just make sure filelog.renamed() returns True - meta = dict(copyrev=hex(nullid), copy='bar') + meta = {'copyrev': hex(nullid), 'copy': 'bar'} else: meta = {}