Colin Watson has proposed merging 
~cjwatson/launchpad-buildd:fix-drop-py2-requirement into 
launchpad-buildd:master.

Commit message:
Fix tests during package build after dropping Python 2

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/415796

`TacTestFixture` defaults to using `/usr/bin/twistd`, but that doesn't exist 
now that we no longer install the Python 2 version of Twisted.  Default to 
`/usr/bin/twistd3` instead.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad-buildd:fix-drop-py2-requirement into 
launchpad-buildd:master.
diff --git a/lpbuildd/tests/harness.py b/lpbuildd/tests/harness.py
index f064d53..ce1809f 100644
--- a/lpbuildd/tests/harness.py
+++ b/lpbuildd/tests/harness.py
@@ -106,6 +106,15 @@ class BuilddTestSetup(TacTestFixture):
 
     >>> fixture.tearDown()
     """
+
+    def setUp(self, **kwargs):
+        # TacTestFixture defaults to /usr/bin/twistd, but on Ubuntu the
+        # Python 3 version of this is /usr/bin/twistd3, so that makes for a
+        # better default.
+        if kwargs.get("twistd_script") is None:
+            kwargs["twistd_script"] = "/usr/bin/twistd3"
+        super().setUp(**kwargs)
+
     def setUpRoot(self):
         """Recreate empty root directory to avoid problems."""
         if os.path.exists(self.root):
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to