Mercurial > hg-stable
comparison tests/test-demandimport.py @ 8449:807f3f5c60e9
tests: renamed Python tests to .py
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sun, 17 May 2009 01:39:31 +0200 |
parents | tests/test-demandimport@9626819b2e3d |
children | 705278e70457 |
comparison
equal
deleted
inserted
replaced
8448:0eb8c4df61bd | 8449:807f3f5c60e9 |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 from mercurial import demandimport | |
4 demandimport.enable() | |
5 | |
6 import re | |
7 | |
8 rsub = re.sub | |
9 def f(obj): | |
10 l = repr(obj) | |
11 l = rsub("0x[0-9a-fA-F]+", "0x?", l) | |
12 l = rsub("from '.*'", "from '?'", l) | |
13 return l | |
14 | |
15 import os | |
16 | |
17 print "os =", f(os) | |
18 print "os.system =", f(os.system) | |
19 print "os =", f(os) | |
20 | |
21 from mercurial import util | |
22 | |
23 print "util =", f(util) | |
24 print "util.system =", f(util.system) | |
25 print "util =", f(util) | |
26 print "util.system =", f(util.system) | |
27 | |
28 import re as fred | |
29 print "fred =", f(fred) | |
30 | |
31 import sys as re | |
32 print "re =", f(re) | |
33 | |
34 print "fred =", f(fred) | |
35 print "fred.sub =", f(fred.sub) | |
36 print "fred =", f(fred) | |
37 | |
38 print "re =", f(re) | |
39 print "re.stdout =", f(re.stdout) | |
40 print "re =", f(re) |