##// END OF EJS Templates
tests: make test-url use absolute_import
Pulkit Goyal -
r28914:63fe5ddb default
parent child Browse files
Show More
@@ -67,7 +67,6 b''
67 tests/test-symlink-os-yes-fs-no.py not using absolute_import
67 tests/test-symlink-os-yes-fs-no.py not using absolute_import
68 tests/test-trusted.py requires print_function
68 tests/test-trusted.py requires print_function
69 tests/test-ui-color.py not using absolute_import
69 tests/test-ui-color.py not using absolute_import
70 tests/test-url.py not using absolute_import
71
70
72 #if py3exe
71 #if py3exe
73 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py
72 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py
@@ -1,4 +1,6 b''
1 from __future__ import print_function
1 from __future__ import absolute_import, print_function
2
3 import doctest
2 import os
4 import os
3
5
4 def check(a, b):
6 def check(a, b):
@@ -8,8 +10,11 b' def check(a, b):'
8 def cert(cn):
10 def cert(cn):
9 return {'subject': ((('commonName', cn),),)}
11 return {'subject': ((('commonName', cn),),)}
10
12
11 from mercurial.sslutil import _verifycert
13 from mercurial import (
14 sslutil,
15 )
12
16
17 _verifycert = sslutil._verifycert
13 # Test non-wildcard certificates
18 # Test non-wildcard certificates
14 check(_verifycert(cert('example.com'), 'example.com'),
19 check(_verifycert(cert('example.com'), 'example.com'),
15 None)
20 None)
@@ -58,8 +63,6 b" check(_verifycert(None, 'example.com'),"
58 check(_verifycert(cert(u'\u4f8b.jp'), 'example.jp'),
63 check(_verifycert(cert(u'\u4f8b.jp'), 'example.jp'),
59 'IDN in certificate not supported')
64 'IDN in certificate not supported')
60
65
61 import doctest
62
63 def test_url():
66 def test_url():
64 """
67 """
65 >>> from mercurial.util import url
68 >>> from mercurial.util import url
General Comments 0
You need to be logged in to leave comments. Login now