jjlee / mechanize

Stateful programmatic web browsing in Python, after Andy Lester's Perl module WWW::Mechanize .
http://wwwsearch.sourceforge.net/mechanize/
618 stars 123 forks source link

Errors met during testing #34

Closed cheese closed 13 years ago

cheese commented 13 years ago

I have mechanize 0.2.4, python 2.7, zope.interface 3.6.1 and twisted.web2 8.1.0 on Fedora 14.

build log: http://koji.fedoraproject.org/koji/getfile?taskID=2698590&name=build.log

jjlee commented 13 years ago

What does the "-1" in python-mechanize-0.2.4-1.fc14.src.rpm mean? Does that mean that patches have been applied?

Can you try running the tests with the --log-server option? :

python test.py --log-server
cheese commented 13 years ago

No patches.

New build log with --log-server: http://koji.fedoraproject.org/koji/getfile?taskID=2699669&name=build.log

jjlee commented 13 years ago

Thanks. Does changing this line in MANIFEST.in:

recursive-include test-tools *.py

to this:

recursive-include test-tools *.py *.cgi

fix it for you? I'm slightly puzzled why this wasn't picked up at mechanize release time since the release script runs easy_install and then runs the tests on that installed copy of mechanize using a clean sys.path environment...

cheese commented 13 years ago

It seems not work.

jjlee commented 13 years ago

So did you check why the .cgi still isn't there?

cheese commented 13 years ago

I include the .cgi file from the git repo to the source tree, then all tests go through now.

jjlee commented 13 years ago

Include cookietest.cgi in source distribution

Add a test run to release script to catch mistakes in MANIFEST.in re test files.

Closed by 9b19a6fcbbb8e36c043ddbc9ee6dbfcfa240ae87

jjlee commented 13 years ago

Oh, I see: my release tests test against mechanize installed using easy_install. I don't install the tests, and I can't just add them to sys.path without adding the "uninstalled" mechanize module to sys.path a second time (there should be an extra directory level there to allow that). So the script copies the test dependencies to a new directory -- but it copies them from the tagged build source, not from the code that was just installed.

I added a new test run to cover that, which just unpacks the tarball and runs test.py. Oddly, though the new test run fails with mechanize-0.2.4.tar.gz, if I make a new tarball with the old MANIFEST.in it passes, because the .cgi is there, despite not being listed in the MANIFEST.in! I'm just putting that down to distutils weirdness, and I've added *.cgi to the MANIFEST.in anyway, for luck ;-)