Mercurial > hg-stable
changeset 29434:7dce56174916
py3: add tests in check-code to load modules from util.py
The conditionalize imports are added in util.py and now we import modules from
there. So adding tests so that someone in future can use that.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 27 Jun 2016 19:10:30 +0530 |
parents | 33770d2b6cf9 |
children | b8ede1f79126 |
files | contrib/check-code.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Mon Jun 27 16:48:54 2016 +0530 +++ b/contrib/check-code.py Mon Jun 27 19:10:30 2016 +0530 @@ -325,6 +325,11 @@ (r'^import Queue', "don't use Queue, use util.queue + util.empty"), (r'^import cStringIO', "don't use cStringIO.StringIO, use util.stringio"), (r'^import urllib', "don't use urllib, use util.urlreq/util.urlerr"), + (r'^import SocketServer', "don't use SockerServer, use util.socketserver"), + (r'^import urlparse', "don't use urlparse, use util.urlparse"), + (r'^import xmlrpclib', "don't use xmlrpclib, use util.xmlrpclib"), + (r'^import cPickle', "don't use cPickle, use util.pickle"), + (r'^import pickle', "don't use pickle, use util.pickle"), (r'\.next\(\)', "don't use .next(), use next(...)"), # rules depending on implementation of repquote()