Mercurial > public > mercurial-scm > hg
comparison tests/test-url.py @ 20685:56b1f39dd0c1
test-url: move from dict() construction to {} literals
The latter are both faster and more consistent across Python 2 and 3.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Wed, 12 Mar 2014 13:21:17 -0400 |
parents | ec8a49c46d7e |
children | 4b0fc75f9403 |
comparison
equal
deleted
inserted
replaced
20684:2761a791b113 | 20685:56b1f39dd0c1 |
---|---|
3 def check(a, b): | 3 def check(a, b): |
4 if a != b: | 4 if a != b: |
5 print (a, b) | 5 print (a, b) |
6 | 6 |
7 def cert(cn): | 7 def cert(cn): |
8 return dict(subject=((('commonName', cn),),)) | 8 return {'subject': ((('commonName', cn),),)} |
9 | 9 |
10 from mercurial.sslutil import _verifycert | 10 from mercurial.sslutil import _verifycert |
11 | 11 |
12 # Test non-wildcard certificates | 12 # Test non-wildcard certificates |
13 check(_verifycert(cert('example.com'), 'example.com'), | 13 check(_verifycert(cert('example.com'), 'example.com'), |