tests/test-extension.t
branchstable
changeset 46025 27c23c8f14da
parent 45008 e1ea913da2ed
child 45948 250e18437e30
--- a/tests/test-extension.t	Mon Nov 23 11:47:06 2020 -0500
+++ b/tests/test-extension.t	Fri Nov 27 14:54:37 2020 -0500
@@ -1399,12 +1399,20 @@
   > cmdtable = {}
   > command = registrar.command(cmdtable)
   > class Bogon(Exception): pass
+  > # NB: version should be bytes; simulating extension not ported to py3
+  > __version__ = '1.0.0'
   > @command(b'throw', [], b'hg throw', norepo=True)
   > def throw(ui, **opts):
   >     """throws an exception"""
   >     raise Bogon()
   > EOF
 
+Test extension without proper byteification of key attributes doesn't crash when
+accessed.
+
+  $ hg version -v --config extensions.throw=throw.py | grep '^ '
+    throw  external  1.0.0
+
 No declared supported version, extension complains:
   $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
   ** Unknown exception encountered with possibly-broken third-party extension throw