Last modified: 2014-07-21 09:31:11 UTC
Running tests/page_tests.py under windows causes python.exe to crash. Suspect it is due to having mwparserfromhell installed, but not being able to use the mwparserfromhell.parser.use_c which I manually have to set to false to ensure that python doesn't crash, will investigate and provide followup
Change 138209 had a related patch set uploaded by Gerrit Patch Uploader: fix pep8 error in the categoryFormat() and add check for mwparserfromhell usage on windows, and set parser.use_c = False if you can load mwpfh on windows. See bug 66330 https://gerrit.wikimedia.org/r/138209
Change 138210 had a related patch set uploaded by Gerrit Patch Uploader: fix pep8 error in the categoryFormat() and add check for mwparserfromhell usage on windows, and set parser.use_c = False if you can load mwpfh on windows. See bug 66330 https://gerrit.wikimedia.org/r/138210
Change 138211 had a related patch set uploaded by Gerrit Patch Uploader: fix pep8 error in the categoryFormat() and add check for mwparserfromhell usage on windows, and set parser.use_c = False if you can load mwpfh on windows. See bug 66330 https://gerrit.wikimedia.org/r/138211
Change 138211 abandoned by John Vandenberg: fix pep8 error in the categoryFormat() and add check for mwparserfromhell usage on windows, and set parser.use_c = False if you can load mwpfh on windows. See bug 66330 Reason: Dup of Id1bafc078f924a4cc52bfe165b9639af9d4145d https://gerrit.wikimedia.org/r/138211
Do all test case in tests/page_tests.py fail? Can you attach a log of the unit test? In the gerrit code review https://gerrit.wikimedia.org/r/#/c/138209/, it was explained that the issue upstream was closed without resolution: https://github.com/earwig/mwparserfromhell/issues/54
C:\rewrite>pwb.py tests\page_tests.py --v testHashCmp (__main__.TestLinkObject) ... ok testNamespaces (__main__.TestLinkObject) Test that Link() normalizes namespace names ... ok testTitles (__main__.TestLinkObject) Test that Link() normalizes titles ... ok testApiMethods (__main__.TestPageObject) Test various methods that rely on API. ... is all I get
I am running on windows environment without mwpfh installed. It's result is: c:\Pywikipedia\ssh\pywikibot\core>pwb.py tests/page_tests -v testHashCmp (__main__.TestLinkObject) ... ok testNamespaces (__main__.TestLinkObject) Test that Link() normalizes namespace names ... ok testTitles (__main__.TestLinkObject) Test that Link() normalizes titles ... ok testApiMethods (__main__.TestPageObject) Test various methods that rely on API. ... ok testGeneral (__main__.TestPageObject) ... ok testIsCategory (__main__.TestPageObject) Test isCategory method. ... ok testIsDisambig (__main__.TestPageObject) ... ok testIsImage (__main__.TestPageObject) ... ok testIsRedirect (__main__.TestPageObject) ... ok testIsTalkPage (__main__.TestPageObject) Test isTalkPage() method. ... ok testLinks (__main__.TestPageObject) ... ok testNamespace (__main__.TestPageObject) Test namespace() method ... ok testPageGet (__main__.TestPageObject) ... ok testReferences (__main__.TestPageObject) ... ok testSection (__main__.TestPageObject) Test section() method. ... ok testSite (__main__.TestPageObject) Test site() method ... ok testTitle (__main__.TestPageObject) Test title() method options. ... ok ---------------------------------------------------------------------- Ran 17 tests in 2.806s OK c:\Pywikipedia\ssh\pywikibot\core> After cleaning the api-cache I got the same exept it needs some more time: Ran 17 tests in 32.706s OK
I have installed mwparserfromhell using pip, resulting in 0.3.3, and mwparserfromhell.parser.use_c being True by default. When I run textlib_tests and page_tests, they run correctly on a 32bit system. I suspect that there was a problem with the mwparserfromhell build, either upstream or a local build issue. Recommend reinstalling again via pip, to be sure. If the problem still exists, run the tests with full debug/verbose logging as shown in https://gerrit.wikimedia.org/r/#/c/146046/ , then remove the password from the log and upload it as an attachment to bugzilla, re-open the bug, and specify whether you have 64bit or 32bit machine.
Change 138210 abandoned by John Vandenberg: fix pep8 error in the categoryFormat() and add check for mwparserfromhell usage on windows, and set parser.use_c = False if you can load mwpfh on windows. See bug 66330 Reason: Cant reproduce the problem, and if there is still a problem it needs to be fixed in mwparserfromhell. https://gerrit.wikimedia.org/r/138210