Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #11706
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Norbert Preining <norbert@preining.info> |
| Newsgroups | linux.debian.maint.python |
| Subject | Re: updating mechanize - help concerning tests with pybuild |
| Date | Sat, 31 Aug 2019 18:00:02 +0200 |
| Message-ID | <yBdXc-3yj-9@gated-at.bofh.it> (permalink) |
| References | <yB2p3-4sn-9@gated-at.bofh.it> <yB6M1-7nS-5@gated-at.bofh.it> |
| X-Original-To | Dmitry Shachnev <mitya57@debian.org> |
| X-Mailbox-Line | From debian-python-request@lists.debian.org Sat Aug 31 15:51:08 2019 |
| Old-Return-Path | <norbert@preining.info> |
| X-Amavis-Spam-Status | No, score=-6.107 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FOURLA=0.1, LDO_WHITELIST=-5, RDNS_NONE=0.793] autolearn=no autolearn_force=no |
| X-Policyd-Weight | using cached result; rate: -4.6 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | NeoMutt/20180716 |
| X-Spam_Score | -1.0 |
| X-Spam_Bar | - |
| X-Mailing-List | <debian-python@lists.debian.org> archive/latest/17221 |
| List-ID | <debian-python.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-python/> |
| List-Archive | https://lists.debian.org/msgid-search/20190831153402.jv2jui7a2tcc7jp6@bulldog.preining.info |
| Approved | robomod@news.nic.it |
| Lines | 89 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Cc | debian-python@lists.debian.org |
| X-Original-Date | Sun, 1 Sep 2019 00:34:02 +0900 |
| X-Original-Message-ID | <20190831153402.jv2jui7a2tcc7jp6@bulldog.preining.info> |
| X-Original-References | <20190831023354.5x6lawa4gmy2nemy@bulldog.preining.info> <20190831081403.GB11010@mitya57.me> |
| Xref | csiph.com linux.debian.maint.python:11706 |
Show key headers only | View raw
Dear Dmitry
thanks for your email!
On Sat, 31 Aug 2019, Dmitry Shachnev wrote:
> - 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"
Ok, I have done this and added the necessary files. Interestingly, I
*still* get errors:
Testing manually in the root:
$ pwd
.../mechanize.git
$ ls
... examples mechanize test test-tools ...
$ python2.7 run_tests.py
...............................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 303 tests in 6.048s
OK
Testing manually in the build directory
$ pwd
.../mechanize.git/.pybuild/cpython2_2.7_mechanize/build
$ ls
... examples mechanize test test-tools ...
$ python2.7 run_tests.py
...............................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 303 tests in 5.960s
OK
Finally doing dpkg-buildpackage or whatever
debian/rules override_dh_auto_test-indep
make[1]: Entering directory '/home/norbert/Development/calibre/mechanize.git'
dh_auto_test -- --system custom --test-args "{interpreter} run_tests.py"
pybuild --test -i python{version} -p 2.7 --system custom --test-args "{interpreter} run_tests.py"
I: pybuild base:217: python2.7 run_tests.py
.................................................................................................................................................................E...EEEEEEE.EEF.E.EEE.EE.EEEEEEEEEE..................................................................................FF.......................
Now, the interesting thing are the error messages. One of them is
ERROR: test_mozilla_cookiejar (test.test_functional.CookieJarTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/norbert/Development/calibre/mechanize.git/test/test_functional.py", line 684, in test_mozilla_cookiejar
self._test_cookiejar(make_cookiejar, commit)
File "/home/norbert/Development/calibre/mechanize.git/test/test_functional.py", line 654, in _test_cookiejar
html = br.open(url).read()
File "/home/norbert/Development/calibre/mechanize.git/mechanize/_mechanize.py", line 253, in open
return self._mech_open(url_or_request, data, timeout=timeout)
File "/home/norbert/Development/calibre/mechanize.git/mechanize/_mechanize.py", line 309, in _mech_open
raise response
httperror_seek_wrapper: HTTP Error 403: request disallowed by robots.txt
Huuuu? Why does it use the original file directly in mechanize.git???
run_tests.py does more or less
this_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(this_dir, "test"))
sys.path.insert(0, os.path.join(this_dir, "test-tools"))
sys.path.insert(0, os.path.join(this_dir, "mechanize"))
so **why** does it use the test/test-tools/mechanize from the ROOT
instead of the python test build?
It seems something is messed up in the pybuild test setup?
If you want to take a look, here is the git repo with the current
status:
https://github.com/norbusan/debian-mechanize.git
Thanks a lot and all the best
Norbert
--
PREINING Norbert http://www.preining.info
Accelia Inc. + IFMGA ProGuide + TU Wien + JAIST + TeX Live + Debian Dev
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
updating mechanize - help concerning tests with pybuild Norbert Preining <norbert@preining.info> - 2019-08-31 05:40 +0200
Re: updating mechanize - help concerning tests with pybuild Andrey Rahmatullin <wrar@debian.org> - 2019-08-31 09:00 +0200
Re: updating mechanize - help concerning tests with pybuild Dmitry Shachnev <mitya57@debian.org> - 2019-08-31 10:20 +0200
Re: updating mechanize - help concerning tests with pybuild Dmitry Shachnev <mitya57@debian.org> - 2019-08-31 18:00 +0200
Re: updating mechanize - help concerning tests with pybuild Dmitry Shachnev <mitya57@debian.org> - 2019-08-31 18:10 +0200
Re: updating mechanize - help concerning tests with pybuild Norbert Preining <norbert@preining.info> - 2019-08-31 18:50 +0200
Re: updating mechanize - help concerning tests with pybuild Norbert Preining <norbert@preining.info> - 2019-08-31 18:00 +0200
Re: updating mechanize - help concerning tests with pybuild Raphael Hertzog <hertzog@debian.org> - 2019-08-31 19:20 +0200
Re: updating mechanize - help concerning tests with pybuild Norbert Preining <norbert@preining.info> - 2019-08-31 19:50 +0200
Re: updating mechanize - help concerning tests with pybuild Raphael Hertzog <hertzog@debian.org> - 2019-08-31 21:00 +0200
Re: updating mechanize - help concerning tests with pybuild Norbert Preining <norbert@preining.info> - 2019-09-01 02:20 +0200
Re: updating mechanize - help concerning tests with pybuild Matthias Klose <doko@debian.org> - 2019-09-01 02:50 +0200
Re: updating mechanize - help concerning tests with pybuild Norbert Preining <norbert@preining.info> - 2019-09-01 03:30 +0200
Re: updating mechanize - help concerning tests with pybuild Raphael Hertzog <hertzog@debian.org> - 2019-09-01 10:10 +0200
Re: updating mechanize - help concerning tests with pybuild Norbert Preining <norbert@preining.info> - 2019-09-01 13:50 +0200
Re: updating mechanize - help concerning tests with pybuild Norbert Preining <norbert@preining.info> - 2019-09-01 15:40 +0200
Re: updating mechanize - help concerning tests with pybuild Andrey Rahmatullin <wrar@debian.org> - 2019-08-31 19:50 +0200
Re: updating mechanize - help concerning tests with pybuild Arnaud Fontaine <arnau@debian.org> - 2019-09-02 07:20 +0200
Re: updating mechanize - help concerning tests with pybuild Norbert Preining <norbert@preining.info> - 2019-09-02 07:40 +0200
csiph-web