Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #11706
| From | Norbert Preining <norbert@preining.info> |
|---|---|
| Newsgroups | linux.debian.maint.python |
| Subject | Re: updating mechanize - help concerning tests with pybuild |
| Date | 2019-08-31 18:00 +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> |
| Organization | linux.* mail to news gateway |
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