Show More
@@ -1,203 +1,202 | |||||
1 | #require test-repo |
|
1 | #require test-repo | |
2 |
|
2 | |||
3 | $ cd "$TESTDIR"/.. |
|
3 | $ cd "$TESTDIR"/.. | |
4 |
|
4 | |||
5 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py |
|
5 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py | |
6 | doc/check-seclevel.py not using absolute_import |
|
6 | doc/check-seclevel.py not using absolute_import | |
7 | doc/gendoc.py not using absolute_import |
|
7 | doc/gendoc.py not using absolute_import | |
8 | doc/hgmanpage.py not using absolute_import |
|
8 | doc/hgmanpage.py not using absolute_import | |
9 | hgext/color.py not using absolute_import |
|
9 | hgext/color.py not using absolute_import | |
10 | hgext/eol.py not using absolute_import |
|
10 | hgext/eol.py not using absolute_import | |
11 | hgext/extdiff.py not using absolute_import |
|
11 | hgext/extdiff.py not using absolute_import | |
12 | hgext/factotum.py not using absolute_import |
|
12 | hgext/factotum.py not using absolute_import | |
13 | hgext/fetch.py not using absolute_import |
|
13 | hgext/fetch.py not using absolute_import | |
14 | hgext/fsmonitor/pywatchman/__init__.py not using absolute_import |
|
14 | hgext/fsmonitor/pywatchman/__init__.py not using absolute_import | |
15 | hgext/fsmonitor/pywatchman/__init__.py requires print_function |
|
15 | hgext/fsmonitor/pywatchman/__init__.py requires print_function | |
16 | hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import |
|
16 | hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import | |
17 | hgext/fsmonitor/pywatchman/pybser.py not using absolute_import |
|
17 | hgext/fsmonitor/pywatchman/pybser.py not using absolute_import | |
18 | hgext/gpg.py not using absolute_import |
|
18 | hgext/gpg.py not using absolute_import | |
19 | hgext/graphlog.py not using absolute_import |
|
19 | hgext/graphlog.py not using absolute_import | |
20 | hgext/hgcia.py not using absolute_import |
|
20 | hgext/hgcia.py not using absolute_import | |
21 | hgext/hgk.py not using absolute_import |
|
21 | hgext/hgk.py not using absolute_import | |
22 | hgext/highlight/__init__.py not using absolute_import |
|
22 | hgext/highlight/__init__.py not using absolute_import | |
23 | hgext/highlight/highlight.py not using absolute_import |
|
23 | hgext/highlight/highlight.py not using absolute_import | |
24 | hgext/histedit.py not using absolute_import |
|
24 | hgext/histedit.py not using absolute_import | |
25 | hgext/largefiles/__init__.py not using absolute_import |
|
25 | hgext/largefiles/__init__.py not using absolute_import | |
26 | hgext/largefiles/basestore.py not using absolute_import |
|
26 | hgext/largefiles/basestore.py not using absolute_import | |
27 | hgext/largefiles/lfcommands.py not using absolute_import |
|
27 | hgext/largefiles/lfcommands.py not using absolute_import | |
28 | hgext/largefiles/lfutil.py not using absolute_import |
|
28 | hgext/largefiles/lfutil.py not using absolute_import | |
29 | hgext/largefiles/localstore.py not using absolute_import |
|
29 | hgext/largefiles/localstore.py not using absolute_import | |
30 | hgext/largefiles/overrides.py not using absolute_import |
|
30 | hgext/largefiles/overrides.py not using absolute_import | |
31 | hgext/largefiles/proto.py not using absolute_import |
|
31 | hgext/largefiles/proto.py not using absolute_import | |
32 | hgext/largefiles/remotestore.py not using absolute_import |
|
32 | hgext/largefiles/remotestore.py not using absolute_import | |
33 | hgext/largefiles/reposetup.py not using absolute_import |
|
33 | hgext/largefiles/reposetup.py not using absolute_import | |
34 | hgext/largefiles/uisetup.py not using absolute_import |
|
34 | hgext/largefiles/uisetup.py not using absolute_import | |
35 | hgext/largefiles/wirestore.py not using absolute_import |
|
35 | hgext/largefiles/wirestore.py not using absolute_import | |
36 | hgext/mq.py not using absolute_import |
|
36 | hgext/mq.py not using absolute_import | |
37 | hgext/rebase.py not using absolute_import |
|
37 | hgext/rebase.py not using absolute_import | |
38 | hgext/share.py not using absolute_import |
|
38 | hgext/share.py not using absolute_import | |
39 | hgext/win32text.py not using absolute_import |
|
39 | hgext/win32text.py not using absolute_import | |
40 | i18n/check-translation.py not using absolute_import |
|
40 | i18n/check-translation.py not using absolute_import | |
41 | i18n/polib.py not using absolute_import |
|
41 | i18n/polib.py not using absolute_import | |
42 | setup.py not using absolute_import |
|
42 | setup.py not using absolute_import | |
43 | tests/heredoctest.py requires print_function |
|
43 | tests/heredoctest.py requires print_function | |
44 | tests/killdaemons.py not using absolute_import |
|
44 | tests/killdaemons.py not using absolute_import | |
45 | tests/md5sum.py not using absolute_import |
|
45 | tests/md5sum.py not using absolute_import | |
46 | tests/mockblackbox.py not using absolute_import |
|
46 | tests/mockblackbox.py not using absolute_import | |
47 | tests/printenv.py not using absolute_import |
|
47 | tests/printenv.py not using absolute_import | |
48 | tests/readlink.py not using absolute_import |
|
48 | tests/readlink.py not using absolute_import | |
49 | tests/readlink.py requires print_function |
|
49 | tests/readlink.py requires print_function | |
50 | tests/revlog-formatv0.py not using absolute_import |
|
50 | tests/revlog-formatv0.py not using absolute_import | |
51 | tests/run-tests.py not using absolute_import |
|
51 | tests/run-tests.py not using absolute_import | |
52 | tests/sitecustomize.py not using absolute_import |
|
52 | tests/sitecustomize.py not using absolute_import | |
53 | tests/svn-safe-append.py not using absolute_import |
|
53 | tests/svn-safe-append.py not using absolute_import | |
54 | tests/svnxml.py not using absolute_import |
|
54 | tests/svnxml.py not using absolute_import | |
55 | tests/test-atomictempfile.py not using absolute_import |
|
55 | tests/test-atomictempfile.py not using absolute_import | |
56 | tests/test-demandimport.py not using absolute_import |
|
56 | tests/test-demandimport.py not using absolute_import | |
57 | tests/test-demandimport.py requires print_function |
|
57 | tests/test-demandimport.py requires print_function | |
58 | tests/test-doctest.py not using absolute_import |
|
58 | tests/test-doctest.py not using absolute_import | |
59 | tests/test-hgwebdir-paths.py not using absolute_import |
|
59 | tests/test-hgwebdir-paths.py not using absolute_import | |
60 | tests/test-lrucachedict.py not using absolute_import |
|
60 | tests/test-lrucachedict.py not using absolute_import | |
61 | tests/test-lrucachedict.py requires print_function |
|
61 | tests/test-lrucachedict.py requires print_function | |
62 | tests/test-manifest.py not using absolute_import |
|
62 | tests/test-manifest.py not using absolute_import | |
63 | tests/test-pathencode.py not using absolute_import |
|
63 | tests/test-pathencode.py not using absolute_import | |
64 | tests/test-pathencode.py requires print_function |
|
64 | tests/test-pathencode.py requires print_function | |
65 | tests/test-run-tests.py not using absolute_import |
|
|||
66 | tests/test-simplemerge.py not using absolute_import |
|
65 | tests/test-simplemerge.py not using absolute_import | |
67 | tests/test-trusted.py requires print_function |
|
66 | tests/test-trusted.py requires print_function | |
68 |
|
67 | |||
69 | #if py3exe |
|
68 | #if py3exe | |
70 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py |
|
69 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py | |
71 | contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (<unknown>, line *) (glob) |
|
70 | contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (<unknown>, line *) (glob) | |
72 | doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
71 | doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
73 | hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
72 | hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
74 | hgext/blackbox.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
73 | hgext/blackbox.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
75 | hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob) |
|
74 | hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob) | |
76 | hgext/censor.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
75 | hgext/censor.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
77 | hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) |
|
76 | hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) | |
78 | hgext/children.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
77 | hgext/children.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
79 | hgext/churn.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
78 | hgext/churn.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
80 | hgext/clonebundles.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
79 | hgext/clonebundles.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
81 | hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
80 | hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
82 | hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
81 | hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
83 | hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
82 | hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
84 | hgext/convert/convcmd.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
83 | hgext/convert/convcmd.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
85 | hgext/convert/cvs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
84 | hgext/convert/cvs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
86 | hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
85 | hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
87 | hgext/convert/darcs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
86 | hgext/convert/darcs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
88 | hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
87 | hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
89 | hgext/convert/git.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
88 | hgext/convert/git.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
90 | hgext/convert/gnuarch.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
89 | hgext/convert/gnuarch.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
91 | hgext/convert/hg.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
90 | hgext/convert/hg.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
92 | hgext/convert/monotone.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
91 | hgext/convert/monotone.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
93 | hgext/convert/p*.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
92 | hgext/convert/p*.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
94 | hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
93 | hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
95 | hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob) |
|
94 | hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob) | |
96 | hgext/eol.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
95 | hgext/eol.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
97 | hgext/extdiff.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
96 | hgext/extdiff.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
98 | hgext/factotum.py: error importing: <ImportError> No module named 'httplib' (error at url.py:*) (glob) |
|
97 | hgext/factotum.py: error importing: <ImportError> No module named 'httplib' (error at url.py:*) (glob) | |
99 | hgext/fetch.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
98 | hgext/fetch.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
100 | hgext/fsmonitor/watchmanclient.py: error importing module: <SystemError> Parent module 'hgext.fsmonitor' not loaded, cannot perform relative import (line *) (glob) |
|
99 | hgext/fsmonitor/watchmanclient.py: error importing module: <SystemError> Parent module 'hgext.fsmonitor' not loaded, cannot perform relative import (line *) (glob) | |
101 | hgext/gpg.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
100 | hgext/gpg.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
102 | hgext/graphlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
101 | hgext/graphlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
103 | hgext/hgcia.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
102 | hgext/hgcia.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
104 | hgext/hgk.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
103 | hgext/hgk.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
105 | hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
104 | hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
106 | hgext/keyword.py: error importing: <ImportError> No module named 'BaseHTTPServer' (error at common.py:*) (glob) |
|
105 | hgext/keyword.py: error importing: <ImportError> No module named 'BaseHTTPServer' (error at common.py:*) (glob) | |
107 | hgext/largefiles/basestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
106 | hgext/largefiles/basestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
108 | hgext/largefiles/lfcommands.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
107 | hgext/largefiles/lfcommands.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
109 | hgext/largefiles/lfutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
108 | hgext/largefiles/lfutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
110 | hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) |
|
109 | hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) | |
111 | hgext/largefiles/overrides.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
110 | hgext/largefiles/overrides.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
112 | hgext/largefiles/proto.py: error importing: <ImportError> No module named 'httplib' (error at httppeer.py:*) (glob) |
|
111 | hgext/largefiles/proto.py: error importing: <ImportError> No module named 'httplib' (error at httppeer.py:*) (glob) | |
113 | hgext/largefiles/remotestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) |
|
112 | hgext/largefiles/remotestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) | |
114 | hgext/largefiles/reposetup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
113 | hgext/largefiles/reposetup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
115 | hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob) |
|
114 | hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob) | |
116 | hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) |
|
115 | hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) | |
117 | hgext/mq.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
116 | hgext/mq.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
118 | hgext/notify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
117 | hgext/notify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
119 | hgext/pager.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
118 | hgext/pager.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
120 | hgext/patchbomb.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
119 | hgext/patchbomb.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
121 | hgext/purge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
120 | hgext/purge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
122 | hgext/rebase.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
121 | hgext/rebase.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
123 | hgext/record.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
122 | hgext/record.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
124 | hgext/relink.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
123 | hgext/relink.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
125 | hgext/schemes.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
124 | hgext/schemes.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
126 | hgext/share.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
125 | hgext/share.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
127 | hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
126 | hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
128 | hgext/strip.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
127 | hgext/strip.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
129 | hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
128 | hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
130 | mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
129 | mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
131 | mercurial/branchmap.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
130 | mercurial/branchmap.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
132 | mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
131 | mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
133 | mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
132 | mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
134 | mercurial/changegroup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
133 | mercurial/changegroup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
135 | mercurial/changelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
134 | mercurial/changelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
136 | mercurial/cmdutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
135 | mercurial/cmdutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
137 | mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
136 | mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
138 | mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) |
|
137 | mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) | |
139 | mercurial/context.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
138 | mercurial/context.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
140 | mercurial/copies.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
139 | mercurial/copies.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
141 | mercurial/crecord.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
140 | mercurial/crecord.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
142 | mercurial/dirstate.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
141 | mercurial/dirstate.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
143 | mercurial/discovery.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
142 | mercurial/discovery.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
144 | mercurial/dispatch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
143 | mercurial/dispatch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
145 | mercurial/exchange.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
144 | mercurial/exchange.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
146 | mercurial/extensions.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
145 | mercurial/extensions.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
147 | mercurial/filelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
146 | mercurial/filelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
148 | mercurial/filemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
147 | mercurial/filemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
149 | mercurial/fileset.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
148 | mercurial/fileset.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
150 | mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
149 | mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
151 | mercurial/graphmod.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
150 | mercurial/graphmod.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
152 | mercurial/help.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
151 | mercurial/help.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
153 | mercurial/hg.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
152 | mercurial/hg.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
154 | mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) |
|
153 | mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) | |
155 | mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
154 | mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
156 | mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
155 | mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
157 | mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
156 | mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
158 | mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
157 | mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
159 | mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) |
|
158 | mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) | |
160 | mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
159 | mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
161 | mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
160 | mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
162 | mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
161 | mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
163 | mercurial/hook.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
162 | mercurial/hook.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
164 | mercurial/httpclient/_readers.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
163 | mercurial/httpclient/_readers.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
165 | mercurial/httpconnection.py: error importing: <ImportError> No module named 'httplib' (error at __init__.py:*) (glob) |
|
164 | mercurial/httpconnection.py: error importing: <ImportError> No module named 'httplib' (error at __init__.py:*) (glob) | |
166 | mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
165 | mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
167 | mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
166 | mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
168 | mercurial/localrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
167 | mercurial/localrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
169 | mercurial/mail.py: error importing module: <AttributeError> module 'email' has no attribute 'Header' (line *) (glob) |
|
168 | mercurial/mail.py: error importing module: <AttributeError> module 'email' has no attribute 'Header' (line *) (glob) | |
170 | mercurial/manifest.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
169 | mercurial/manifest.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
171 | mercurial/merge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
170 | mercurial/merge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
172 | mercurial/namespaces.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
171 | mercurial/namespaces.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
173 | mercurial/patch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
172 | mercurial/patch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
174 | mercurial/pure/mpatch.py: error importing module: <ImportError> cannot import name 'pycompat' (line *) (glob) |
|
173 | mercurial/pure/mpatch.py: error importing module: <ImportError> cannot import name 'pycompat' (line *) (glob) | |
175 | mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'mercurial.pure.node' (line *) (glob) |
|
174 | mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'mercurial.pure.node' (line *) (glob) | |
176 | mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
175 | mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
177 | mercurial/revlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
176 | mercurial/revlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
178 | mercurial/revset.py: error importing module: <AttributeError> 'dict' object has no attribute 'iteritems' (line *) (glob) |
|
177 | mercurial/revset.py: error importing module: <AttributeError> 'dict' object has no attribute 'iteritems' (line *) (glob) | |
179 | mercurial/scmutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
178 | mercurial/scmutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
180 | mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
179 | mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) | |
181 | mercurial/simplemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
180 | mercurial/simplemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
182 | mercurial/sshpeer.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) |
|
181 | mercurial/sshpeer.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) | |
183 | mercurial/sshserver.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
182 | mercurial/sshserver.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
184 | mercurial/statichttprepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
183 | mercurial/statichttprepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
185 | mercurial/store.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
184 | mercurial/store.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
186 | mercurial/streamclone.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
185 | mercurial/streamclone.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
187 | mercurial/subrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
186 | mercurial/subrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
188 | mercurial/templatefilters.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
187 | mercurial/templatefilters.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
189 | mercurial/templatekw.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
188 | mercurial/templatekw.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
190 | mercurial/templater.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
189 | mercurial/templater.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
191 | mercurial/ui.py: error importing: <ImportError> No module named 'cPickle' (error at formatter.py:*) (glob) |
|
190 | mercurial/ui.py: error importing: <ImportError> No module named 'cPickle' (error at formatter.py:*) (glob) | |
192 | mercurial/unionrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
191 | mercurial/unionrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
193 | mercurial/url.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
192 | mercurial/url.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
194 | mercurial/verify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
193 | mercurial/verify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
195 | mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob) |
|
194 | mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob) | |
196 | mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
195 | mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) | |
197 | mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
196 | mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
198 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
197 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
199 | tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
198 | tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
200 | tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
199 | tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
201 | tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
200 | tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
202 |
|
201 | |||
203 | #endif |
|
202 | #endif |
@@ -1,98 +1,99 | |||||
1 | """test line matching with some failing examples and some which warn |
|
1 | """test line matching with some failing examples and some which warn | |
2 |
|
2 | |||
3 | run-test.t only checks positive matches and can not see warnings |
|
3 | run-test.t only checks positive matches and can not see warnings | |
4 | (both by design) |
|
4 | (both by design) | |
5 | """ |
|
5 | """ | |
6 | from __future__ import print_function |
|
6 | from __future__ import absolute_import, print_function | |
7 |
|
7 | |||
8 |
import |
|
8 | import doctest | |
|
9 | import os | |||
|
10 | import re | |||
9 | # this is hack to make sure no escape characters are inserted into the output |
|
11 | # this is hack to make sure no escape characters are inserted into the output | |
10 | if 'TERM' in os.environ: |
|
12 | if 'TERM' in os.environ: | |
11 | del os.environ['TERM'] |
|
13 | del os.environ['TERM'] | |
12 | import doctest |
|
|||
13 | run_tests = __import__('run-tests') |
|
14 | run_tests = __import__('run-tests') | |
14 |
|
15 | |||
15 | def prn(ex): |
|
16 | def prn(ex): | |
16 | m = ex.args[0] |
|
17 | m = ex.args[0] | |
17 | if isinstance(m, str): |
|
18 | if isinstance(m, str): | |
18 | print(m) |
|
19 | print(m) | |
19 | else: |
|
20 | else: | |
20 | print(m.decode('utf-8')) |
|
21 | print(m.decode('utf-8')) | |
21 |
|
22 | |||
22 | def lm(expected, output): |
|
23 | def lm(expected, output): | |
23 | r"""check if output matches expected |
|
24 | r"""check if output matches expected | |
24 |
|
25 | |||
25 | does it generally work? |
|
26 | does it generally work? | |
26 | >>> lm(b'H*e (glob)\n', b'Here\n') |
|
27 | >>> lm(b'H*e (glob)\n', b'Here\n') | |
27 | True |
|
28 | True | |
28 |
|
29 | |||
29 | fail on bad test data |
|
30 | fail on bad test data | |
30 | >>> try: lm(b'a\n',b'a') |
|
31 | >>> try: lm(b'a\n',b'a') | |
31 | ... except AssertionError as ex: print(ex) |
|
32 | ... except AssertionError as ex: print(ex) | |
32 | missing newline |
|
33 | missing newline | |
33 | >>> try: lm(b'single backslash\n', b'single \backslash\n') |
|
34 | >>> try: lm(b'single backslash\n', b'single \backslash\n') | |
34 | ... except AssertionError as ex: prn(ex) |
|
35 | ... except AssertionError as ex: prn(ex) | |
35 | single backslash or unknown char |
|
36 | single backslash or unknown char | |
36 | """ |
|
37 | """ | |
37 | assert (expected.endswith(b'\n') |
|
38 | assert (expected.endswith(b'\n') | |
38 | and output.endswith(b'\n')), 'missing newline' |
|
39 | and output.endswith(b'\n')), 'missing newline' | |
39 | assert not re.search(br'[^ \w\\/\r\n()*?]', expected + output), \ |
|
40 | assert not re.search(br'[^ \w\\/\r\n()*?]', expected + output), \ | |
40 | b'single backslash or unknown char' |
|
41 | b'single backslash or unknown char' | |
41 | match = run_tests.TTest.linematch(expected, output) |
|
42 | match = run_tests.TTest.linematch(expected, output) | |
42 | if isinstance(match, str): |
|
43 | if isinstance(match, str): | |
43 | return 'special: ' + match |
|
44 | return 'special: ' + match | |
44 | elif isinstance(match, bytes): |
|
45 | elif isinstance(match, bytes): | |
45 | return 'special: ' + match.decode('utf-8') |
|
46 | return 'special: ' + match.decode('utf-8') | |
46 | else: |
|
47 | else: | |
47 | return bool(match) # do not return match object |
|
48 | return bool(match) # do not return match object | |
48 |
|
49 | |||
49 | def wintests(): |
|
50 | def wintests(): | |
50 | r"""test matching like running on windows |
|
51 | r"""test matching like running on windows | |
51 |
|
52 | |||
52 | enable windows matching on any os |
|
53 | enable windows matching on any os | |
53 | >>> _osaltsep = os.altsep |
|
54 | >>> _osaltsep = os.altsep | |
54 | >>> os.altsep = True |
|
55 | >>> os.altsep = True | |
55 |
|
56 | |||
56 | valid match on windows |
|
57 | valid match on windows | |
57 | >>> lm(b'g/a*/d (glob)\n', b'g\\abc/d\n') |
|
58 | >>> lm(b'g/a*/d (glob)\n', b'g\\abc/d\n') | |
58 | True |
|
59 | True | |
59 |
|
60 | |||
60 | direct matching, glob unnecessary |
|
61 | direct matching, glob unnecessary | |
61 | >>> lm(b'g/b (glob)\n', b'g/b\n') |
|
62 | >>> lm(b'g/b (glob)\n', b'g/b\n') | |
62 | 'special: -glob' |
|
63 | 'special: -glob' | |
63 |
|
64 | |||
64 | missing glob |
|
65 | missing glob | |
65 | >>> lm(b'/g/c/d/fg\n', b'\\g\\c\\d/fg\n') |
|
66 | >>> lm(b'/g/c/d/fg\n', b'\\g\\c\\d/fg\n') | |
66 | 'special: +glob' |
|
67 | 'special: +glob' | |
67 |
|
68 | |||
68 | restore os.altsep |
|
69 | restore os.altsep | |
69 | >>> os.altsep = _osaltsep |
|
70 | >>> os.altsep = _osaltsep | |
70 | """ |
|
71 | """ | |
71 | pass |
|
72 | pass | |
72 |
|
73 | |||
73 | def otherostests(): |
|
74 | def otherostests(): | |
74 | r"""test matching like running on non-windows os |
|
75 | r"""test matching like running on non-windows os | |
75 |
|
76 | |||
76 | disable windows matching on any os |
|
77 | disable windows matching on any os | |
77 | >>> _osaltsep = os.altsep |
|
78 | >>> _osaltsep = os.altsep | |
78 | >>> os.altsep = False |
|
79 | >>> os.altsep = False | |
79 |
|
80 | |||
80 | backslash does not match slash |
|
81 | backslash does not match slash | |
81 | >>> lm(b'h/a* (glob)\n', b'h\\ab\n') |
|
82 | >>> lm(b'h/a* (glob)\n', b'h\\ab\n') | |
82 | False |
|
83 | False | |
83 |
|
84 | |||
84 | direct matching glob can not be recognized |
|
85 | direct matching glob can not be recognized | |
85 | >>> lm(b'h/b (glob)\n', b'h/b\n') |
|
86 | >>> lm(b'h/b (glob)\n', b'h/b\n') | |
86 | True |
|
87 | True | |
87 |
|
88 | |||
88 | missing glob can not not be recognized |
|
89 | missing glob can not not be recognized | |
89 | >>> lm(b'/h/c/df/g/\n', b'\\h/c\\df/g\\\n') |
|
90 | >>> lm(b'/h/c/df/g/\n', b'\\h/c\\df/g\\\n') | |
90 | False |
|
91 | False | |
91 |
|
92 | |||
92 | restore os.altsep |
|
93 | restore os.altsep | |
93 | >>> os.altsep = _osaltsep |
|
94 | >>> os.altsep = _osaltsep | |
94 | """ |
|
95 | """ | |
95 | pass |
|
96 | pass | |
96 |
|
97 | |||
97 | if __name__ == '__main__': |
|
98 | if __name__ == '__main__': | |
98 | doctest.testmod() |
|
99 | doctest.testmod() |
General Comments 0
You need to be logged in to leave comments.
Login now