https://bugzilla.wikimedia.org/show_bug.cgi?id=70809
Bug ID: 70809 Summary: searchNs does not necessarily returns True when searchable Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: mpaa.wiki@gmail.com Web browser: --- Mobile Platform: ---
This makes site_tests fail.
FAIL: testSearch (site_tests.TestSiteObject) Test the site.search() method ---------------------------------------------------------------------- Traceback (most recent call last): File "site_tests.py", line 780, in testSearch self.assertTrue(all(hit.namespace() in search_ns for hit in se)) AssertionError: False is not true
On wikisource:
https://en.wikisource.org//w/api.php?action=query&format=json&meta=u...
{ "query": { "userinfo": { "id": 257091, "name": "Mpaa", "options": { ... "searchNs0": "", "searchNs1": false, "searchNs2": false, "searchNs3": false, "searchNs4": false, "searchNs5": false, "searchNs6": false, "searchNs7": false, "searchNs8": false, "searchNs9": false, "searchNs10": false, "searchNs11": false, "searchNs12": false, "searchNs13": false, "searchNs14": false, "searchNs15": false, "searchNs100": false, "searchNs101": false, "searchNs102": "", "searchNs103": false, "searchNs104": false, "searchNs105": false, "searchNs106": "", "searchNs107": false, "searchNs114": "", "searchNs115": false, "searchNs828": false, "searchNs829": false, ... } } } }
https://bugzilla.wikimedia.org/show_bug.cgi?id=70809
--- Comment #1 from Mpaa mpaa.wiki@gmail.com --- "searchNs0": "" is actually not searchable. So not an error.
Maybe the test should be skipped in such condition?
https://bugzilla.wikimedia.org/show_bug.cgi?id=70809
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID
pywikipedia-bugs@lists.wikimedia.org