John Vandenberg has uploaded a new change for review.

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

Change subject: Remove doctests from library
......................................................................

Remove doctests from library

These are run by jenkins and the same code paths
are covered by tests in the test suite.

Change-Id: I08f854bea80b407b5949fe92080034d3c674554a
---
M pywikibot/data/api.py
M pywikibot/tools/__init__.py
2 files changed, 0 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/26/218126/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index fbdb02d..be9665c 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -2838,19 +2838,3 @@
 
     if "flowinfo" in pagedict:
         page._flowinfo = pagedict['flowinfo']['flow']
-
-
-if __name__ == "__main__":
-    import logging
-    from pywikibot import Site
-    logging.getLogger("pywiki.data.api").setLevel(logging.DEBUG)
-    mysite = Site("en", "wikipedia")
-    pywikibot.output(u"starting test....")
-
-    def _test():
-        import doctest
-        doctest.testmod()
-    try:
-        _test()
-    finally:
-        pywikibot.stopme()
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 3a836db..d3f531d 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -1351,10 +1351,3 @@
             if self._deprecated[attr][1]:
                 return self._deprecated[attr][1]
         return getattr(self._module, attr)
-
-
-if __name__ == "__main__":
-    def _test():
-        import doctest
-        doctest.testmod()
-    _test()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08f854bea80b407b5949fe92080034d3c674554a
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to