##// END OF EJS Templates
tests: add tons of b prefixes in test-devel-warnings.t...
Augie Fackler -
r36142:0dde5f53 default
parent child Browse files
Show More
@@ -17,7 +17,7 b''
17 17 >
18 18 > @command(b'buggytransaction', [], '')
19 19 > def buggylocking(ui, repo):
20 > tr = repo.transaction('buggy')
20 > tr = repo.transaction(b'buggy')
21 21 > # make sure we rollback the transaction as we don't want to rely on the__del__
22 22 > tr.release()
23 23 >
@@ -26,8 +26,8 b''
26 26 > """check that reentrance is fine"""
27 27 > wl = repo.wlock()
28 28 > lo = repo.lock()
29 > tr = repo.transaction('proper')
30 > tr2 = repo.transaction('proper')
29 > tr = repo.transaction(b'proper')
30 > tr2 = repo.transaction(b'proper')
31 31 > lo2 = repo.lock()
32 32 > wl2 = repo.wlock()
33 33 > wl2.release()
@@ -46,34 +46,34 b''
46 46 >
47 47 > @command(b'no-wlock-write', [], '')
48 48 > def nowlockwrite(ui, repo):
49 > with repo.vfs(b'branch', 'a'):
49 > with repo.vfs(b'branch', b'a'):
50 50 > pass
51 51 >
52 52 > @command(b'no-lock-write', [], '')
53 53 > def nolockwrite(ui, repo):
54 > with repo.svfs(b'fncache', 'a'):
54 > with repo.svfs(b'fncache', b'a'):
55 55 > pass
56 56 >
57 57 > @command(b'stripintr', [], '')
58 58 > def stripintr(ui, repo):
59 59 > lo = repo.lock()
60 > tr = repo.transaction('foobar')
60 > tr = repo.transaction(b'foobar')
61 61 > try:
62 > repair.strip(repo.ui, repo, [repo['.'].node()])
62 > repair.strip(repo.ui, repo, [repo[b'.'].node()])
63 63 > finally:
64 64 > lo.release()
65 65 > @command(b'oldanddeprecated', [], '')
66 66 > def oldanddeprecated(ui, repo):
67 67 > """test deprecation warning API"""
68 68 > def foobar(ui):
69 > ui.deprecwarn('foorbar is deprecated, go shopping', '42.1337')
69 > ui.deprecwarn(b'foorbar is deprecated, go shopping', b'42.1337')
70 70 > foobar(ui)
71 71 > @command(b'nouiwarning', [], '')
72 72 > def nouiwarning(ui, repo):
73 > util.nouideprecwarn('this is a test', '13.37')
73 > util.nouideprecwarn(b'this is a test', b'13.37')
74 74 > @command(b'programmingerror', [], '')
75 75 > def programmingerror(ui, repo):
76 > raise error.ProgrammingError('something went wrong', hint='try again')
76 > raise error.ProgrammingError(b'something went wrong', hint=b'try again')
77 77 > EOF
78 78
79 79 $ cat << EOF >> $HGRCPATH
@@ -331,7 +331,7 b' Old style deprecation warning'
331 331 $ hg nouiwarning
332 332 $TESTTMP/buggylocking.py:*: DeprecationWarning: this is a test (glob)
333 333 (compatibility will be dropped after Mercurial-13.37, update your code.)
334 util.nouideprecwarn('this is a test', '13.37')
334 util.nouideprecwarn(b'this is a test', b'13.37')
335 335
336 336 (disabled outside of test run)
337 337
@@ -350,25 +350,25 b' Test warning on config option access and'
350 350 > configtable = {}
351 351 > configitem = registrar.configitem(configtable)
352 352 >
353 > configitem('test', 'some', default='foo')
354 > configitem('test', 'dynamic', default=configitems.dynamicdefault)
355 > configitem('test', 'callable', default=list)
353 > configitem(b'test', b'some', default=b'foo')
354 > configitem(b'test', b'dynamic', default=configitems.dynamicdefault)
355 > configitem(b'test', b'callable', default=list)
356 356 > # overwrite a core config
357 > configitem('ui', 'quiet', default=False)
358 > configitem('ui', 'interactive', default=None)
357 > configitem(b'ui', b'quiet', default=False)
358 > configitem(b'ui', b'interactive', default=None)
359 359 >
360 360 > @command(b'buggyconfig')
361 361 > def cmdbuggyconfig(ui, repo):
362 > repo.ui.config('ui', 'quiet', True)
363 > repo.ui.config('ui', 'interactive', False)
364 > repo.ui.config('test', 'some', 'bar')
365 > repo.ui.config('test', 'some', 'foo')
366 > repo.ui.config('test', 'dynamic', 'some-required-default')
367 > repo.ui.config('test', 'dynamic')
368 > repo.ui.config('test', 'callable', [])
369 > repo.ui.config('test', 'callable', 'foo')
370 > repo.ui.config('test', 'unregistered')
371 > repo.ui.config('unregistered', 'unregistered')
362 > repo.ui.config(b'ui', b'quiet', True)
363 > repo.ui.config(b'ui', b'interactive', False)
364 > repo.ui.config(b'test', b'some', b'bar')
365 > repo.ui.config(b'test', b'some', b'foo')
366 > repo.ui.config(b'test', b'dynamic', b'some-required-default')
367 > repo.ui.config(b'test', b'dynamic')
368 > repo.ui.config(b'test', b'callable', [])
369 > repo.ui.config(b'test', b'callable', b'foo')
370 > repo.ui.config(b'test', b'unregistered')
371 > repo.ui.config(b'unregistered', b'unregistered')
372 372 > EOF
373 373
374 374 $ hg --config "extensions.buggyconfig=${TESTTMP}/buggyconfig.py" buggyconfig
General Comments 0
You need to be logged in to leave comments. Login now