comparison tests/test-demandimport @ 4631:e3afa670e484

demandimport: fix issue579 and add a test fix suggested by Brendan
author Matt Mackall <mpm@selenic.com>
date Mon, 18 Jun 2007 19:43:26 -0500
parents
children 3a4310e8fe72
comparison
equal deleted inserted replaced
4630:e6d105a51ec7 4631:e3afa670e484
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-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 import mercurial.version
22
23 print "mercurial.version =", f(mercurial.version)
24 print "mercurial.version.get_version =", f(mercurial.version.get_version)
25 print "mercurial.version =", f(mercurial.version)
26 print "mercurial =", f(mercurial)
27
28 from mercurial import util
29
30 print "util =", f(util)
31 print "util.system =", f(util.system)
32 print "util =", f(util)
33 print "util.system =", f(util.system)
34
35 import re as fred
36 print "fred =", f(fred)
37
38 import sys as re
39 print "re =", f(re)
40
41 print "fred =", f(fred)
42 print "fred.sub =", f(fred.sub)
43 print "fred =", f(fred)
44
45 print "re =", f(re)
46 print "re.stdout =", f(re.stdout)
47 print "re =", f(re)