##// END OF EJS Templates
tests: port test-hgwebdir-paths.py to Python 3...
Augie Fackler -
r37896:81455f48 default
parent child Browse files
Show More
@@ -1,462 +1,463
1 1 test-abort-checkin.t
2 2 test-add.t
3 3 test-addremove-similar.t
4 4 test-addremove.t
5 5 test-amend-subrepo.t
6 6 test-amend.t
7 7 test-ancestor.py
8 8 test-annotate.py
9 9 test-annotate.t
10 10 test-archive-symlinks.t
11 11 test-atomictempfile.py
12 12 test-audit-path.t
13 13 test-audit-subrepo.t
14 14 test-automv.t
15 15 test-backout.t
16 16 test-backwards-remove.t
17 17 test-basic.t
18 18 test-bheads.t
19 19 test-bisect.t
20 20 test-bisect2.t
21 21 test-bisect3.t
22 22 test-blackbox.t
23 23 test-bookmarks-current.t
24 24 test-bookmarks-merge.t
25 25 test-bookmarks-rebase.t
26 26 test-bookmarks-strip.t
27 27 test-bookmarks.t
28 28 test-branch-change.t
29 29 test-branch-option.t
30 30 test-branch-tag-confict.t
31 31 test-branches.t
32 32 test-bundle-phases.t
33 33 test-bundle-type.t
34 34 test-bundle-vs-outgoing.t
35 35 test-bundle2-multiple-changegroups.t
36 36 test-cappedreader.py
37 37 test-casecollision.t
38 38 test-cat.t
39 39 test-censor.t
40 40 test-changelog-exec.t
41 41 test-check-commit.t
42 42 test-check-execute.t
43 43 test-check-interfaces.py
44 44 test-check-module-imports.t
45 45 test-check-pyflakes.t
46 46 test-check-pylint.t
47 47 test-check-shbang.t
48 48 test-children.t
49 49 test-clone-cgi.t
50 50 test-clone-pull-corruption.t
51 51 test-clone-r.t
52 52 test-clone-update-order.t
53 53 test-command-template.t
54 54 test-commit-amend.t
55 55 test-commit-interactive.t
56 56 test-commit-multiple.t
57 57 test-commit-unresolved.t
58 58 test-commit.t
59 59 test-committer.t
60 60 test-completion.t
61 61 test-config-env.py
62 62 test-config.t
63 63 test-conflict.t
64 64 test-confused-revert.t
65 65 test-contrib-check-code.t
66 66 test-contrib-check-commit.t
67 67 test-convert-authormap.t
68 68 test-convert-clonebranches.t
69 69 test-convert-datesort.t
70 70 test-convert-filemap.t
71 71 test-convert-hg-sink.t
72 72 test-convert-hg-source.t
73 73 test-convert-hg-startrev.t
74 74 test-convert-splicemap.t
75 75 test-convert-tagsbranch-topology.t
76 76 test-copy-move-merge.t
77 77 test-copy.t
78 78 test-copytrace-heuristics.t
79 79 test-debugbuilddag.t
80 80 test-debugbundle.t
81 81 test-debugextensions.t
82 82 test-debugindexdot.t
83 83 test-debugrename.t
84 84 test-default-push.t
85 85 test-diff-binary-file.t
86 86 test-diff-change.t
87 87 test-diff-copy-depth.t
88 88 test-diff-hashes.t
89 89 test-diff-ignore-whitespace.t
90 90 test-diff-indent-heuristic.t
91 91 test-diff-issue2761.t
92 92 test-diff-newlines.t
93 93 test-diff-reverse.t
94 94 test-diff-subdir.t
95 95 test-diff-unified.t
96 96 test-diff-upgrade.t
97 97 test-diffdir.t
98 98 test-diffstat.t
99 99 test-directaccess.t
100 100 test-dirstate-backup.t
101 101 test-dirstate-nonnormalset.t
102 102 test-dirstate.t
103 103 test-doctest.py
104 104 test-double-merge.t
105 105 test-drawdag.t
106 106 test-duplicateoptions.py
107 107 test-editor-filename.t
108 108 test-empty-dir.t
109 109 test-empty-file.t
110 110 test-empty-group.t
111 111 test-empty.t
112 112 test-encode.t
113 113 test-encoding-func.py
114 114 test-encoding.t
115 115 test-eol-add.t
116 116 test-eol-clone.t
117 117 test-eol-hook.t
118 118 test-eol-tag.t
119 119 test-eol-update.t
120 120 test-excessive-merge.t
121 121 test-exchange-obsmarkers-case-A1.t
122 122 test-exchange-obsmarkers-case-A2.t
123 123 test-exchange-obsmarkers-case-A3.t
124 124 test-exchange-obsmarkers-case-A4.t
125 125 test-exchange-obsmarkers-case-A5.t
126 126 test-exchange-obsmarkers-case-A6.t
127 127 test-exchange-obsmarkers-case-A7.t
128 128 test-exchange-obsmarkers-case-B1.t
129 129 test-exchange-obsmarkers-case-B2.t
130 130 test-exchange-obsmarkers-case-B3.t
131 131 test-exchange-obsmarkers-case-B4.t
132 132 test-exchange-obsmarkers-case-B5.t
133 133 test-exchange-obsmarkers-case-B6.t
134 134 test-exchange-obsmarkers-case-B7.t
135 135 test-exchange-obsmarkers-case-C1.t
136 136 test-exchange-obsmarkers-case-C2.t
137 137 test-exchange-obsmarkers-case-C3.t
138 138 test-exchange-obsmarkers-case-C4.t
139 139 test-exchange-obsmarkers-case-D1.t
140 140 test-exchange-obsmarkers-case-D2.t
141 141 test-exchange-obsmarkers-case-D3.t
142 142 test-exchange-obsmarkers-case-D4.t
143 143 test-execute-bit.t
144 144 test-export.t
145 145 test-extdata.t
146 146 test-extdiff.t
147 147 test-extra-filelog-entry.t
148 148 test-filebranch.t
149 149 test-fileset-generated.t
150 150 test-fix-topology.t
151 151 test-flags.t
152 152 test-generaldelta.t
153 153 test-getbundle.t
154 154 test-git-export.t
155 155 test-glog-topological.t
156 156 test-gpg.t
157 157 test-graft.t
158 158 test-hg-parseurl.py
159 159 test-hghave.t
160 160 test-hgignore.t
161 161 test-hgk.t
162 162 test-hgweb-bundle.t
163 163 test-hgweb-descend-empties.t
164 164 test-hgweb-empty.t
165 165 test-hgweb-removed.t
166 test-hgwebdir-paths.py
166 167 test-hgwebdirsym.t
167 168 test-histedit-arguments.t
168 169 test-histedit-base.t
169 170 test-histedit-bookmark-motion.t
170 171 test-histedit-commute.t
171 172 test-histedit-drop.t
172 173 test-histedit-edit.t
173 174 test-histedit-fold-non-commute.t
174 175 test-histedit-fold.t
175 176 test-histedit-no-change.t
176 177 test-histedit-non-commute-abort.t
177 178 test-histedit-non-commute.t
178 179 test-histedit-obsolete.t
179 180 test-histedit-outgoing.t
180 181 test-histedit-templates.t
181 182 test-http-branchmap.t
182 183 test-http-bundle1.t
183 184 test-http-clone-r.t
184 185 test-http.t
185 186 test-hybridencode.py
186 187 test-identify.t
187 188 test-import-unknown.t
188 189 test-import.t
189 190 test-imports-checker.t
190 191 test-incoming-outgoing.t
191 192 test-inherit-mode.t
192 193 test-issue1089.t
193 194 test-issue1102.t
194 195 test-issue1175.t
195 196 test-issue1306.t
196 197 test-issue1438.t
197 198 test-issue1502.t
198 199 test-issue1802.t
199 200 test-issue1877.t
200 201 test-issue1993.t
201 202 test-issue2137.t
202 203 test-issue3084.t
203 204 test-issue4074.t
204 205 test-issue522.t
205 206 test-issue586.t
206 207 test-issue612.t
207 208 test-issue619.t
208 209 test-issue660.t
209 210 test-issue672.t
210 211 test-issue842.t
211 212 test-journal-exists.t
212 213 test-journal-share.t
213 214 test-journal.t
214 215 test-largefiles-cache.t
215 216 test-largefiles-misc.t
216 217 test-largefiles-small-disk.t
217 218 test-largefiles-update.t
218 219 test-largefiles.t
219 220 test-lfs-largefiles.t
220 221 test-linerange.py
221 222 test-locate.t
222 223 test-lock-badness.t
223 224 test-log-linerange.t
224 225 test-log.t
225 226 test-logexchange.t
226 227 test-lrucachedict.py
227 228 test-mactext.t
228 229 test-mailmap.t
229 230 test-manifest-merging.t
230 231 test-manifest.py
231 232 test-manifest.t
232 233 test-match.py
233 234 test-mdiff.py
234 235 test-merge-changedelete.t
235 236 test-merge-closedheads.t
236 237 test-merge-commit.t
237 238 test-merge-criss-cross.t
238 239 test-merge-default.t
239 240 test-merge-force.t
240 241 test-merge-halt.t
241 242 test-merge-internal-tools-pattern.t
242 243 test-merge-local.t
243 244 test-merge-remove.t
244 245 test-merge-revert.t
245 246 test-merge-revert2.t
246 247 test-merge-subrepos.t
247 248 test-merge-symlinks.t
248 249 test-merge-tools.t
249 250 test-merge-types.t
250 251 test-merge1.t
251 252 test-merge10.t
252 253 test-merge2.t
253 254 test-merge4.t
254 255 test-merge5.t
255 256 test-merge6.t
256 257 test-merge7.t
257 258 test-merge8.t
258 259 test-merge9.t
259 260 test-minifileset.py
260 261 test-mq-git.t
261 262 test-mq-header-date.t
262 263 test-mq-header-from.t
263 264 test-mq-merge.t
264 265 test-mq-pull-from-bundle.t
265 266 test-mq-qclone-http.t
266 267 test-mq-qdelete.t
267 268 test-mq-qdiff.t
268 269 test-mq-qfold.t
269 270 test-mq-qgoto.t
270 271 test-mq-qimport-fail-cleanup.t
271 272 test-mq-qnew.t
272 273 test-mq-qpush-exact.t
273 274 test-mq-qqueue.t
274 275 test-mq-qrefresh-interactive.t
275 276 test-mq-qrefresh-replace-log-message.t
276 277 test-mq-qrefresh.t
277 278 test-mq-qrename.t
278 279 test-mq-qsave.t
279 280 test-mq-safety.t
280 281 test-mq-subrepo.t
281 282 test-mq-symlinks.t
282 283 test-mv-cp-st-diff.t
283 284 test-narrow-archive.t
284 285 test-narrow-clone-no-ellipsis.t
285 286 test-narrow-clone-non-narrow-server.t
286 287 test-narrow-clone-nonlinear.t
287 288 test-narrow-clone.t
288 289 test-narrow-commit.t
289 290 test-narrow-copies.t
290 291 test-narrow-debugcommands.t
291 292 test-narrow-debugrebuilddirstate.t
292 293 test-narrow-exchange-merges.t
293 294 test-narrow-exchange.t
294 295 test-narrow-expanddirstate.t
295 296 test-narrow-merge.t
296 297 test-narrow-patch.t
297 298 test-narrow-patterns.t
298 299 test-narrow-pull.t
299 300 test-narrow-rebase.t
300 301 test-narrow-shallow-merges.t
301 302 test-narrow-shallow.t
302 303 test-narrow-strip.t
303 304 test-narrow-update.t
304 305 test-nested-repo.t
305 306 test-newbranch.t
306 307 test-obshistory.t
307 308 test-obsmarker-template.t
308 309 test-obsmarkers-effectflag.t
309 310 test-obsolete-bundle-strip.t
310 311 test-obsolete-changeset-exchange.t
311 312 test-obsolete-checkheads.t
312 313 test-obsolete-distributed.t
313 314 test-obsolete-tag-cache.t
314 315 test-parents.t
315 316 test-pathconflicts-merge.t
316 317 test-pathconflicts-update.t
317 318 test-pending.t
318 319 test-permissions.t
319 320 test-phases.t
320 321 test-pull-branch.t
321 322 test-pull-http.t
322 323 test-pull-permission.t
323 324 test-pull-pull-corruption.t
324 325 test-pull-r.t
325 326 test-pull-update.t
326 327 test-purge.t
327 328 test-push-checkheads-partial-C1.t
328 329 test-push-checkheads-partial-C2.t
329 330 test-push-checkheads-partial-C3.t
330 331 test-push-checkheads-partial-C4.t
331 332 test-push-checkheads-pruned-B1.t
332 333 test-push-checkheads-pruned-B2.t
333 334 test-push-checkheads-pruned-B3.t
334 335 test-push-checkheads-pruned-B4.t
335 336 test-push-checkheads-pruned-B5.t
336 337 test-push-checkheads-pruned-B6.t
337 338 test-push-checkheads-pruned-B7.t
338 339 test-push-checkheads-pruned-B8.t
339 340 test-push-checkheads-superceed-A1.t
340 341 test-push-checkheads-superceed-A2.t
341 342 test-push-checkheads-superceed-A3.t
342 343 test-push-checkheads-superceed-A4.t
343 344 test-push-checkheads-superceed-A5.t
344 345 test-push-checkheads-superceed-A6.t
345 346 test-push-checkheads-superceed-A7.t
346 347 test-push-checkheads-superceed-A8.t
347 348 test-push-checkheads-unpushed-D1.t
348 349 test-push-checkheads-unpushed-D2.t
349 350 test-push-checkheads-unpushed-D3.t
350 351 test-push-checkheads-unpushed-D4.t
351 352 test-push-checkheads-unpushed-D5.t
352 353 test-push-checkheads-unpushed-D6.t
353 354 test-push-checkheads-unpushed-D7.t
354 355 test-push-http.t
355 356 test-push-warn.t
356 357 test-pushvars.t
357 358 test-rebase-abort.t
358 359 test-rebase-base-flag.t
359 360 test-rebase-bookmarks.t
360 361 test-rebase-brute-force.t
361 362 test-rebase-cache.t
362 363 test-rebase-check-restore.t
363 364 test-rebase-collapse.t
364 365 test-rebase-conflicts.t
365 366 test-rebase-dest.t
366 367 test-rebase-detach.t
367 368 test-rebase-emptycommit.t
368 369 test-rebase-inmemory.t
369 370 test-rebase-interruptions.t
370 371 test-rebase-issue-noparam-single-rev.t
371 372 test-rebase-legacy.t
372 373 test-rebase-mq-skip.t
373 374 test-rebase-mq.t
374 375 test-rebase-named-branches.t
375 376 test-rebase-newancestor.t
376 377 test-rebase-obsolete.t
377 378 test-rebase-parameters.t
378 379 test-rebase-partial.t
379 380 test-rebase-pull.t
380 381 test-rebase-rename.t
381 382 test-rebase-scenario-global.t
382 383 test-rebase-templates.t
383 384 test-rebase-transaction.t
384 385 test-record.t
385 386 test-relink.t
386 387 test-remove.t
387 388 test-rename-after-merge.t
388 389 test-rename-dir-merge.t
389 390 test-rename-merge1.t
390 391 test-rename.t
391 392 test-repair-strip.t
392 393 test-repo-compengines.t
393 394 test-resolve.t
394 395 test-revert-flags.t
395 396 test-revert-unknown.t
396 397 test-revlog-ancestry.py
397 398 test-revlog-group-emptyiter.t
398 399 test-revlog-mmapindex.t
399 400 test-revlog-packentry.t
400 401 test-revset-dirstate-parents.t
401 402 test-revset-legacy-lookup.t
402 403 test-revset-outgoing.t
403 404 test-rollback.t
404 405 test-run-tests.py
405 406 test-run-tests.t
406 407 test-schemes.t
407 408 test-serve.t
408 409 test-setdiscovery.t
409 410 test-share.t
410 411 test-shelve.t
411 412 test-show-stack.t
412 413 test-show-work.t
413 414 test-show.t
414 415 test-simple-update.t
415 416 test-single-head.t
416 417 test-sparse-clear.t
417 418 test-sparse-import.t
418 419 test-sparse-merges.t
419 420 test-sparse-profiles.t
420 421 test-sparse-requirement.t
421 422 test-sparse-verbose-json.t
422 423 test-ssh-clone-r.t
423 424 test-ssh-proto.t
424 425 test-sshserver.py
425 426 test-stack.t
426 427 test-status-rev.t
427 428 test-status-terse.t
428 429 test-strip-cross.t
429 430 test-strip.t
430 431 test-subrepo-deep-nested-change.t
431 432 test-subrepo-missing.t
432 433 test-subrepo-recursion.t
433 434 test-subrepo-relative-path.t
434 435 test-subrepo.t
435 436 test-symlinks.t
436 437 test-tag.t
437 438 test-tags.t
438 439 test-template-engine.t
439 440 test-treemanifest.t
440 441 test-unamend.t
441 442 test-uncommit.t
442 443 test-unified-test.t
443 444 test-unrelated-pull.t
444 445 test-up-local-change.t
445 446 test-update-branches.t
446 447 test-update-dest.t
447 448 test-update-issue1456.t
448 449 test-update-names.t
449 450 test-update-reverse.t
450 451 test-upgrade-repo.t
451 452 test-url-download.t
452 453 test-url-rev.t
453 454 test-url.py
454 455 test-username-newline.t
455 456 test-verify.t
456 457 test-walkrepo.py
457 458 test-websub.t
458 459 test-win32text.t
459 460 test-wireproto-clientreactor.py
460 461 test-wireproto-framing.py
461 462 test-wireproto-serverreactor.py
462 463 test-xdg.t
@@ -1,48 +1,48
1 1 from __future__ import absolute_import
2 2
3 3 import os
4 4 from mercurial import (
5 5 hg,
6 6 ui as uimod,
7 7 )
8 8 from mercurial.hgweb import (
9 9 hgwebdir_mod,
10 10 )
11 11 hgwebdir = hgwebdir_mod.hgwebdir
12 12
13 os.mkdir('webdir')
14 os.chdir('webdir')
13 os.mkdir(b'webdir')
14 os.chdir(b'webdir')
15 15
16 webdir = os.path.realpath('.')
16 webdir = os.path.realpath(b'.')
17 17
18 18 u = uimod.ui.load()
19 hg.repository(u, 'a', create=1)
20 hg.repository(u, 'b', create=1)
21 os.chdir('b')
22 hg.repository(u, 'd', create=1)
23 os.chdir('..')
24 hg.repository(u, 'c', create=1)
25 os.chdir('..')
19 hg.repository(u, b'a', create=1)
20 hg.repository(u, b'b', create=1)
21 os.chdir(b'b')
22 hg.repository(u, b'd', create=1)
23 os.chdir(b'..')
24 hg.repository(u, b'c', create=1)
25 os.chdir(b'..')
26 26
27 paths = {'t/a/': '%s/a' % webdir,
28 'b': '%s/b' % webdir,
29 'coll': '%s/*' % webdir,
30 'rcoll': '%s/**' % webdir}
27 paths = {b't/a/': b'%s/a' % webdir,
28 b'b': b'%s/b' % webdir,
29 b'coll': b'%s/*' % webdir,
30 b'rcoll': b'%s/**' % webdir}
31 31
32 config = os.path.join(webdir, 'hgwebdir.conf')
33 configfile = open(config, 'w')
34 configfile.write('[paths]\n')
32 config = os.path.join(webdir, b'hgwebdir.conf')
33 configfile = open(config, 'wb')
34 configfile.write(b'[paths]\n')
35 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 37 configfile.close()
38 38
39 39 confwd = hgwebdir(config)
40 40 dictwd = hgwebdir(paths)
41 41
42 42 assert len(confwd.repos) == len(dictwd.repos), 'different numbers'
43 43 assert len(confwd.repos) == 9, 'expected 9 repos, found %d' % len(confwd.repos)
44 44
45 45 found = dict(confwd.repos)
46 46 for key, path in dictwd.repos:
47 47 assert key in found, 'repository %s was not found' % key
48 48 assert found[key] == path, 'different paths for repo %s' % key
General Comments 0
You need to be logged in to leave comments. Login now