changeset 45948: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 a001e28ad5eb
files tests/test-extension.t
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-extension.t	Fri Nov 27 14:54:37 2020 -0500
+++ b/tests/test-extension.t	Fri Nov 27 15:00:39 2020 -0500
@@ -1423,7 +1423,8 @@
   ** Mercurial Distributed SCM * (glob)
   ** Extensions loaded: throw
 
-empty declaration of supported version, extension complains:
+empty declaration of supported version, extension complains (but doesn't choke if
+the value is improperly a str instead of bytes):
   $ echo "testedwith = ''" >> throw.py
   $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
   ** Unknown exception encountered with possibly-broken third-party extension throw
@@ -1434,7 +1435,8 @@
   ** Mercurial Distributed SCM (*) (glob)
   ** Extensions loaded: throw
 
-If the extension specifies a buglink, show that:
+If the extension specifies a buglink, show that (but don't choke if the value is
+improperly a str instead of bytes):
   $ echo 'buglink = "http://example.com/bts"' >> throw.py
   $ rm -f throw.pyc throw.pyo
   $ rm -Rf __pycache__