##// END OF EJS Templates
tests: port test-hgwebdir-paths.py to Python 3...
Augie Fackler -
r37896:81455f48 default
parent child Browse files
Show More
@@ -163,6 +163,7 b' test-hgweb-bundle.t'
163 test-hgweb-descend-empties.t
163 test-hgweb-descend-empties.t
164 test-hgweb-empty.t
164 test-hgweb-empty.t
165 test-hgweb-removed.t
165 test-hgweb-removed.t
166 test-hgwebdir-paths.py
166 test-hgwebdirsym.t
167 test-hgwebdirsym.t
167 test-histedit-arguments.t
168 test-histedit-arguments.t
168 test-histedit-base.t
169 test-histedit-base.t
@@ -10,30 +10,30 b' from mercurial.hgweb import ('
10 )
10 )
11 hgwebdir = hgwebdir_mod.hgwebdir
11 hgwebdir = hgwebdir_mod.hgwebdir
12
12
13 os.mkdir('webdir')
13 os.mkdir(b'webdir')
14 os.chdir('webdir')
14 os.chdir(b'webdir')
15
15
16 webdir = os.path.realpath('.')
16 webdir = os.path.realpath(b'.')
17
17
18 u = uimod.ui.load()
18 u = uimod.ui.load()
19 hg.repository(u, 'a', create=1)
19 hg.repository(u, b'a', create=1)
20 hg.repository(u, 'b', create=1)
20 hg.repository(u, b'b', create=1)
21 os.chdir('b')
21 os.chdir(b'b')
22 hg.repository(u, 'd', create=1)
22 hg.repository(u, b'd', create=1)
23 os.chdir('..')
23 os.chdir(b'..')
24 hg.repository(u, 'c', create=1)
24 hg.repository(u, b'c', create=1)
25 os.chdir('..')
25 os.chdir(b'..')
26
26
27 paths = {'t/a/': '%s/a' % webdir,
27 paths = {b't/a/': b'%s/a' % webdir,
28 'b': '%s/b' % webdir,
28 b'b': b'%s/b' % webdir,
29 'coll': '%s/*' % webdir,
29 b'coll': b'%s/*' % webdir,
30 'rcoll': '%s/**' % webdir}
30 b'rcoll': b'%s/**' % webdir}
31
31
32 config = os.path.join(webdir, 'hgwebdir.conf')
32 config = os.path.join(webdir, b'hgwebdir.conf')
33 configfile = open(config, 'w')
33 configfile = open(config, 'wb')
34 configfile.write('[paths]\n')
34 configfile.write(b'[paths]\n')
35 for k, v in paths.items():
35 for k, v in paths.items():
36 configfile.write('%s = %s\n' % (k, v))
36 configfile.write(b'%s = %s\n' % (k, v))
37 configfile.close()
37 configfile.close()
38
38
39 confwd = hgwebdir(config)
39 confwd = hgwebdir(config)
General Comments 0
You need to be logged in to leave comments. Login now