jayvdb added a comment.
We could use a MediaWiki sqlite database. I am guessing (hoping) that mediawiki has a test runner which sets up a test instance of MediaWiki to run tests against. If so, we should try to use the MediaWiki test framework to set up the MediaWiki instance on localhost. If not, wtf, someone needs to build one of those.
However, I dont see anything like that; their .travis.yml only appears to set up an empty database instance without a http interface. @hashar , am I wrong there? Or do you know if someone is working on building a way for the MediaWiki tests to run live tests against the http frontend processor? For pywikibot needs, it would be sufficient if it only connected api.php to a port; we dont need to access index.php.
TASK DETAIL
https://phabricator.wikimedia.org/T58961
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: pywikipedia-bugs, Ladsgroup, valhallasw, hashar, jayvdb
Unicodesnowman claimed this task.
Unicodesnowman removed a subscriber: Unknown Object (????).
Unicodesnowman added a project: pywikibot-core.
Unicodesnowman set Security to none.
TASK DETAIL
https://phabricator.wikimedia.org/T57255
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Unicodesnowman
Cc: pywikipedia-bugs, Ladsgroup, Legoktm, jayvdb
jayvdb added a comment.
@valhallasw , can you check that file_tests.py does what you expect and we can close this task; see also question above..?
TASK DETAIL
https://phabricator.wikimedia.org/T72494
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: pywikipedia-bugs, valhallasw, Multichill, Mpaa, jayvdb
Ricordisamoa created this task.
Ricordisamoa added subscribers: Aklapper, pywikipedia-bugs, Ricordisamoa.
Ricordisamoa added a project: Pywikibot-General.
Ricordisamoa changed Security from none to none.
TASK DESCRIPTION
Instead of having it hard-coded, as it is now as 'cross_allowed' attribute of Family classes.
See for example [[ //www.mediawiki.org/w/api.php?action=query&list=wikisets&wsprop=type&wslimit=1&wsprop=wikisincluded | this query ]].
TASK DETAIL
https://phabricator.wikimedia.org/T78395
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Ricordisamoa
Cc: Aklapper, Ricordisamoa, pywikipedia-bugs
jayvdb created this task.
jayvdb added subscribers: pywikipedia-bugs, jayvdb, maiden_taiwan.
jayvdb added projects: pywikibot-core, Pywikibot-tests.
jayvdb changed Security from none to none.
TASK DESCRIPTION
"python category.py move -from:x -to:y" is a simple and common operation from the user perspective, performed by the script category.py. Under the covers, quite a bit of integration occurs in order to make this seemingly simple operation work correctly.
As it has been broken a few times in the past, it would be good to build a test case which preps the test wiki, runs the script to perform the move, and then check the script performed the task correctly.
TASK DETAIL
https://phabricator.wikimedia.org/T78258
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, jayvdb, maiden_taiwan, pywikipedia-bugs
jayvdb created this task.
jayvdb claimed this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: Pywikibot-tests.
jayvdb changed Security from none to none.
TASK DESCRIPTION
Probably all causes because there is no data in the RC/ NP feeds. Tests should be marked as skipped.
```
======================================================================
ERROR: test_intersect_newpages_and_recentchanges (tests.pagegenerators_tests.PageGeneratorIntersectTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/pagegenerators_tests.py", line 466, in test_intersect_newpages_and_recentchanges
pagegenerators.RecentChangesPageGenerator(site=site, total=200)])
File "tests/thread_tests.py", line 59, in assertEqualItertools
result = list(intersect_generators(datasets))
File "pywikibot/tools.py", line 326, in intersect_generators
threaded_gen = ThreadedGenerator(name=repr(source), target=source)
File "pywikibot/tools.py", line 165, in __init__
raise RuntimeError("No generator for ThreadedGenerator to run.")
RuntimeError: No generator for ThreadedGenerator to run.
======================================================================
ERROR: test_intersect_newpages_twice (tests.pagegenerators_tests.PageGeneratorIntersectTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/pagegenerators_tests.py", line 460, in test_intersect_newpages_twice
pagegenerators.NewpagesPageGenerator(site=site, total=10)])
File "tests/thread_tests.py", line 59, in assertEqualItertools
result = list(intersect_generators(datasets))
File "pywikibot/tools.py", line 326, in intersect_generators
threaded_gen = ThreadedGenerator(name=repr(source), target=source)
File "pywikibot/tools.py", line 165, in __init__
raise RuntimeError("No generator for ThreadedGenerator to run.")
RuntimeError: No generator for ThreadedGenerator to run.
======================================================================
FAIL: test_newpages_default (tests.pagegenerators_tests.TestFactoryGenerator)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/pagegenerators_tests.py", line 357, in test_newpages_default
self.assertGreater(len(pages), 0)
AssertionError: 0 not greater than 0
----------------------------------------------------------------------
Ran 542 tests in 1004.620s
FAILED (failures=1, errors=2, skipped=35, expected failures=4)
======================================================================
ERROR: test_intersect_newpages_and_recentchanges (tests.pagegenerators_tests.PageGeneratorIntersectTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/pagegenerators_tests.py", line 466, in test_intersect_newpages_and_recentchanges
pagegenerators.RecentChangesPageGenerator(site=site, total=200)])
File "tests/thread_tests.py", line 59, in assertEqualItertools
result = list(intersect_generators(datasets))
File "pywikibot/tools.py", line 326, in intersect_generators
threaded_gen = ThreadedGenerator(name=repr(source), target=source)
File "pywikibot/tools.py", line 165, in __init__
raise RuntimeError("No generator for ThreadedGenerator to run.")
RuntimeError: No generator for ThreadedGenerator to run.
======================================================================
ERROR: test_intersect_newpages_twice (tests.pagegenerators_tests.PageGeneratorIntersectTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/pagegenerators_tests.py", line 460, in test_intersect_newpages_twice
pagegenerators.NewpagesPageGenerator(site=site, total=10)])
File "tests/thread_tests.py", line 59, in assertEqualItertools
result = list(intersect_generators(datasets))
File "pywikibot/tools.py", line 326, in intersect_generators
threaded_gen = ThreadedGenerator(name=repr(source), target=source)
File "pywikibot/tools.py", line 165, in __init__
raise RuntimeError("No generator for ThreadedGenerator to run.")
RuntimeError: No generator for ThreadedGenerator to run.
======================================================================
FAIL: test_newpages_default (tests.pagegenerators_tests.TestFactoryGenerator)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/pagegenerators_tests.py", line 357, in test_newpages_default
self.assertGreater(len(pages), 0)
AssertionError: 0 not greater than 0
----------------------------------------------------------------------
Ran 542 tests in 1004.620s
FAILED (failures=1, errors=2, skipped=35, expected failures=4)
```
TASK DETAIL
https://phabricator.wikimedia.org/T78638
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, jayvdb, pywikipedia-bugs