Patchwork D9434: tests: add a comment that we're purposely testing py2 extension attributes

login
register
mail settings
Submitter phabricator
Date Nov. 28, 2020, 4:49 a.m.
Message ID <differential-rev-PHID-DREV-tinbutyxziczeibg4dao-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47712/
State Superseded
Headers show

Comments

phabricator - Nov. 28, 2020, 4:49 a.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9434

AFFECTED FILES
  tests/test-extension.t

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -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__