]> granicus.if.org Git - python/commit
bpo-30759: Copy test_robotparser from master (#2546)
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 5 Jul 2017 08:00:33 +0000 (10:00 +0200)
committerGitHub <noreply@github.com>
Wed, 5 Jul 2017 08:00:33 +0000 (10:00 +0200)
commit668489a6d5a5b124aea35820ca90cb5e3b2b3ecd
tree6e170c34ab9a1b512cbb10338871ef11ad6fa4b9
parent3050987d85d7cf8cdd4b3c053e673d13cd8dfb12
bpo-30759: Copy test_robotparser from master (#2546)

Copy Lib/test/test_robotparser.py from master to 2.7 and adapt it for
Python 2.7:

* Replace urllib.robotparser with robotparser
* Adjust HTTPServer import
* Replace io.StringIO with StringIO.StringIO
* Remove tests on crawl_delay() and request_rate() since these
  methods were added to Python 3
* Remove subTest()
* Add test_main() which explicitly lists all test cases

Patch based on the commit 4da0fd06ce49132d5c2e0525c4a31f807690a9ed
written by Berker Peksag.

Co-Authored-By: Berker Peksag <berker.peksag@gmail.com>
Lib/test/test_robotparser.py