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