[PATCH] py3: test to check which commands run

Pulkit Goyal 7895pulkit at gmail.com
Sun Oct 9 12:12:40 UTC 2016


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1476014360 -7200
#      Sun Oct 09 13:59:20 2016 +0200
# Node ID 1c8fe0486ff6657929f63f6c354662c6295cfd1d
# Parent  3ce847adae982625abac548017e43da189eb5e71
py3: test to check which commands run

This test helps us to keep track on the commands which runs to Python 3.

diff -r 3ce847adae98 -r 1c8fe0486ff6 tests/test-check-py3-commands.t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-check-py3-commands.t	Sun Oct 09 13:59:20 2016 +0200
@@ -0,0 +1,25 @@
+'''This test helps us in keeping track of what commands we can run in
+Python 3. We can add more commands when this commands work in Python 3.'''
+
+
+  $ . "$TESTDIR/helpers-testrepo.sh"
+  $ cd "$TESTDIR"/..
+
+  $ $PYTHON3 hg version
+  Traceback (most recent call last):
+    File "hg", line 45, in <module>
+      mercurial.dispatch.run()
+    File "/home/pulkit/Repositories/MercurialRepositories/hg-committed/mercurial/dispatch.py", line 60, in run
+      sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
+    File "/home/pulkit/Repositories/MercurialRepositories/hg-committed/mercurial/dispatch.py", line 102, in dispatch
+      req.ui = uimod.ui()
+    File "/home/pulkit/Repositories/MercurialRepositories/hg-committed/mercurial/ui.py", line 139, in __init__
+      for f in scmutil.rcpath():
+    File "/home/pulkit/Repositories/MercurialRepositories/hg-committed/mercurial/scmutil.py", line 758, in rcpath
+      for p in os.environ['HGRCPATH'].split(os.pathsep):
+    File "/usr/lib/python3.5/os.py", line 678, in __getitem__
+      value = self._data[self.encodekey(key)]
+    File "/usr/lib/python3.5/os.py", line 754, in encode
+      raise TypeError("str expected, not %s" % type(value).__name__)
+  TypeError: str expected, not bytes
+  [1]


More information about the Mercurial-devel mailing list