Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Dmitry Shachnev Newsgroups: linux.debian.maint.python Subject: Re: updating mechanize - help concerning tests with pybuild Date: Sat, 31 Aug 2019 10:20:01 +0200 Message-ID: References: X-Original-To: Norbert Preining X-Mailbox-Line: From debian-python-request@lists.debian.org Sat Aug 31 08:14:26 2019 Old-Return-Path: X-Amavis-Spam-Status: No, score=-11.656 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5, PGPSIGNATURE=-5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.406] autolearn=ham autolearn_force=no X-Policyd-Weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-lf1-f65.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5 X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=eI9GG3mOO+X5pFpkQaa+2YeDavvUSQR8rKRh0z+Mow8=; b=X/LVt60bywDbUeVRkMe7sE3rpW6IW6Vxg3s8OxxLm6iK8g2yEecUwrONwGsMz2sQ9b 05EsHpJiRp7U0oPRuh/KX3NEgGgivyMqzG8z5b/EZeJy3XG55vzpcvAidTD2pyQ6z9dc eGKDh3Sc1cyAg4JO7NX842g/pBSea+tN6/DZwqV8vE7unPicFq2IrcovUAlLT0oHGy55 FRKvdfJzdOfetgpva6c94GJw8LI8KBmErMJyJaX1SX1aqVL2OKWgwtCoEQkYVGah5lE4 KrBx9oEgPkJeJQj4uWy4ObDVp7gQDu/n8eV8zjC+mclEWlU3haVFUW4UNQLX5cHYF9/6 phaw== X-Gm-Message-State: APjAAAWlRbSMC2VcZQLvNELl4EMGSm7XNmgACOF9NoiSe8IXrsZBQNt5 xn6B8NRgmf4hSlqO9FEiZEM= X-Google-SMTP-Source: APXvYqxX7rRi26mmfkNeUSu4bsqgNVvjJ5Fe21zQTEZbuOVBAeaewWmDtAotG30re/6+n4VH+oM9YQ== X-Received: by 2002:ac2:5ec8:: with SMTP id d8mr3333663lfq.183.1567239251973; Sat, 31 Aug 2019 01:14:11 -0700 (PDT) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DKU6Jbt7q3WqK7+M" Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Mailing-List: archive/latest/17215 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20190831081403.GB11010@mitya57.me Approved: robomod@news.nic.it Lines: 56 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org, Debian/Ubuntu Zope Team , Fabio Tranchitella , =?iso-8859-1?B?Suly6W15?= Bobbio , Matthias Klose , Arnaud Fontaine X-Original-Date: Sat, 31 Aug 2019 11:14:03 +0300 X-Original-Message-ID: <20190831081403.GB11010@mitya57.me> X-Original-References: <20190831023354.5x6lawa4gmy2nemy@bulldog.preining.info> Xref: csiph.com linux.debian.maint.python:11700 --DKU6Jbt7q3WqK7+M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Norbert, Let me try answering your second question, about tests. On Sat, Aug 31, 2019 at 11:33:54AM +0900, Norbert Preining wrote: > Current mechanize needs to set up a special environment for the tests. > There is a dedicated script > run_tests.py > that would do the trick. I tried to use the pybuild before tests feature > to export PYTHONPATH, but that didn't work. > > Is there a way to run a specific script instead of the built-in tests of > pybuild? Something like this should do the trick: - Add run_tests.py and the tests themselves to debian/pybuild.testfiles, to make pybuild copy them to the build directory. - Add override_dh_auto_test target with a command like this: dh_auto_test -- --system custom --test-args "{interpreter} run_tests.py" Then pybuild will take care of running the tests with all supported interpreters, each one in its own directory, and cleaning up after that. See pybuild(1) for details. -- Dmitry Shachnev --DKU6Jbt7q3WqK7+M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE5688gqe4PSusUZcLZkYmW1hrg8sFAl1qLEsACgkQZkYmW1hr g8t1gw/+Ipwsd539HWBD9uFh/hRSozc6J2TmF9VkaoBwaQrDU1bPq4IemB3rn1Hx fGDOaUKWLb1LGZRdu8nrPsaSqyOZ2lfMlKYbo4C6IWwftq6CFIxz6NlP37alQk9+ 330rYJP282HG0go5RqFycIoaFI96vkcoYH4tMdAF8TDO1CHssGWQlG6vxDHmhOFF t9+Fc7gdNUg/knPt2bbVkD6P4IDioVe++/Y8DJA/MYYZco0G61AKAJbY2N61wfYM 53rx4fGRRzGXoLUYLVn1IO+3ChmSPTE3kQEdo0wKw6CEBcmiBRaJT2yfgUXmDK7V QBzR+U2g61krXecJLAV+SHuc1d930+jmH1ipYhwvvD3JLvAcfSn+BI66Tw99hjub WFRSQ/9qKyC70Dso6fNHPKF1rdUH95shlZeFmae/bJ34EHmg+O41/fQGJ0/EHSJX SBPH8qbreIy4/WgoxbeUrIgoiDm/8kROEvYGqPPDltzCp3mUOSiiyLB1Gv/3sLCS 5vic6BfyT4w34+8C4f57JBHPn536jCvXs5sEnKY9AXB9QYTIIKeYHcfbrgMTUZID Qq7I7kbPLYOlxWoqVA0LN7SfpzdZInVXqsF1700B+0ynTw6tiw4hc8Jk475O5dMn gprcyMN1j4sUmbiIDbvyefgR2se2WkI9qMRZLeqexxo4xx87o4E= =Tw6l -----END PGP SIGNATURE----- --DKU6Jbt7q3WqK7+M--