comparison tests/test-extension.t @ 45963:250e18437e30

tests: add a comment that we're purposely testing py2 extension attributes Avoid someone unknowingly removing test coverage. There are tests for a properly byteified `testedwith` a few lines down. I don't see similar for `buglink`, but it's a trivial conversion to bytes, so I'm not concerned about testing the expected/wanted extension state. Differential Revision: https://phab.mercurial-scm.org/D9434
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 27 Nov 2020 15:00:39 -0500
parents 3db545fccac1
children c26cb33e5219
comparison
equal deleted inserted replaced
45962:3db545fccac1 45963:250e18437e30
1421 ** If that fixes the bug please report it to the extension author. 1421 ** If that fixes the bug please report it to the extension author.
1422 ** Python * (glob) 1422 ** Python * (glob)
1423 ** Mercurial Distributed SCM * (glob) 1423 ** Mercurial Distributed SCM * (glob)
1424 ** Extensions loaded: throw 1424 ** Extensions loaded: throw
1425 1425
1426 empty declaration of supported version, extension complains: 1426 empty declaration of supported version, extension complains (but doesn't choke if
1427 the value is improperly a str instead of bytes):
1427 $ echo "testedwith = ''" >> throw.py 1428 $ echo "testedwith = ''" >> throw.py
1428 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' 1429 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1429 ** Unknown exception encountered with possibly-broken third-party extension throw 1430 ** Unknown exception encountered with possibly-broken third-party extension throw
1430 ** which supports versions unknown of Mercurial. 1431 ** which supports versions unknown of Mercurial.
1431 ** Please disable throw and try your action again. 1432 ** Please disable throw and try your action again.
1432 ** If that fixes the bug please report it to the extension author. 1433 ** If that fixes the bug please report it to the extension author.
1433 ** Python * (glob) 1434 ** Python * (glob)
1434 ** Mercurial Distributed SCM (*) (glob) 1435 ** Mercurial Distributed SCM (*) (glob)
1435 ** Extensions loaded: throw 1436 ** Extensions loaded: throw
1436 1437
1437 If the extension specifies a buglink, show that: 1438 If the extension specifies a buglink, show that (but don't choke if the value is
1439 improperly a str instead of bytes):
1438 $ echo 'buglink = "http://example.com/bts"' >> throw.py 1440 $ echo 'buglink = "http://example.com/bts"' >> throw.py
1439 $ rm -f throw.pyc throw.pyo 1441 $ rm -f throw.pyc throw.pyo
1440 $ rm -Rf __pycache__ 1442 $ rm -Rf __pycache__
1441 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' 1443 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1442 ** Unknown exception encountered with possibly-broken third-party extension throw 1444 ** Unknown exception encountered with possibly-broken third-party extension throw