mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-29 02:24:43 +00:00
Remove Python <= 3.6 compatibility from TestRobotsTxt
3.7 code introduced in:
8678feaa5 ("Make TestRobotsTxt Python 3.7 compatible", 2019-04-22)
This commit is contained in:
parent
7763704067
commit
821d0e3db2
1 changed files with 2 additions and 7 deletions
|
|
@ -17,7 +17,6 @@
|
|||
Test robots.txt parsing.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
import linkcheck.robotparser2
|
||||
|
||||
|
|
@ -224,9 +223,7 @@ class TestRobotsTxt(unittest.TestCase):
|
|||
"Disallow: /tmp",
|
||||
"Disallow: /a%3Cd.html",
|
||||
"Disallow: /a/b.html",
|
||||
"Disallow: /%7Ejoe/index.html"
|
||||
if sys.version_info < (3, 7)
|
||||
else "Disallow: /~joe/index.html",
|
||||
"Disallow: /~joe/index.html",
|
||||
]
|
||||
self.rp.parse(lines)
|
||||
self.assertEqual(str(self.rp), "\n".join(lines2))
|
||||
|
|
@ -257,9 +254,7 @@ class TestRobotsTxt(unittest.TestCase):
|
|||
"Disallow: /tmp/",
|
||||
"Disallow: /a%3Cd.html",
|
||||
"Disallow: /a/b.html",
|
||||
"Disallow: /%7Ejoe/index.html"
|
||||
if sys.version_info < (3, 7)
|
||||
else "Disallow: /~joe/index.html",
|
||||
"Disallow: /~joe/index.html",
|
||||
]
|
||||
self.rp.parse(lines)
|
||||
self.assertEqual(str(self.rp), "\n".join(lines2))
|
||||
|
|
|
|||
Loading…
Reference in a new issue