Last modified: 2014-09-13 17:15:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72809, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70809 - searchNs does not necessarily returns True when searchable
searchNs does not necessarily returns True when searchable
Status: RESOLVED INVALID
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-13 11:55 UTC by Mpaa
Modified: 2014-09-13 17:15 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mpaa 2014-09-13 11:55:06 UTC
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=userinfo&maxlag=5&uiprop=blockinfo|hasmsg|options&format=jsonfm

{
    "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,
                ...
            }
        }
    }
}
Comment 1 Mpaa 2014-09-13 16:41:16 UTC
"searchNs0": "" is actually not searchable.
So not an error.

Maybe the test should be skipped in such condition?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links