John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/168700

Change subject: Fix doctest broken by deprecation warning
......................................................................

Fix doctest broken by deprecation warning

MW API has deprecated the old request query system, issuing a warning
if neither 'continue' nor 'rawcontinue' are in the request params.

This breaks the doctest for the raw Request object, which prevents
jenkins from approving code changes which dont resolve this issue.

Modified the expected outcome to allow for warnings in the response,
so that the dev system isnt in stalemate while waiting for the right
fix.

Change-Id: I07081de95437724233afe38df663256a3e495280
---
M pywikibot/data/api.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/00/168700/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 4f46027..95b9770 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -196,8 +196,8 @@
     >>> data = r.submit()  # doctest: +IGNORE_UNICODE
     >>> isinstance(data, dict)
     True
-    >>> sorted(data.keys())  # doctest: +IGNORE_UNICODE
-    ['query']
+    >>> 'query' in data
+    True
     >>> sorted(data[u'query'].keys())  # doctest: +IGNORE_UNICODE
     ['namespaces', 'userinfo']
 

-- 
To view, visit https://gerrit.wikimedia.org/r/168700
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07081de95437724233afe38df663256a3e495280
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to