mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-30 11:04:50 +00:00
Merge pull request #667 from cjmayo/resultcachesize
Fixed a bug where the resultcachesize setting was ignored.
This commit is contained in:
commit
61792cb879
3 changed files with 5 additions and 2 deletions
|
|
@ -187,6 +187,7 @@ class LCConfigParser(RawConfigParser):
|
|||
except ValueError:
|
||||
self.read_string_option(section, "sslverify")
|
||||
self.read_int_option(section, "maxrunseconds", min=0)
|
||||
self.read_int_option(section, "resultcachesize", min=0)
|
||||
|
||||
def read_authentication_config(self):
|
||||
"""Read configuration options in section "authentication"."""
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ maxnumurls=1000
|
|||
maxrunseconds=1
|
||||
maxfilesizeparse=100
|
||||
maxfilesizedownload=100
|
||||
resultcachesize=100000
|
||||
resultcachesize=9999
|
||||
|
||||
[filtering]
|
||||
ignore=
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ class TestConfig(unittest.TestCase):
|
|||
"""Test configuration parsing."""
|
||||
|
||||
def test_confparse(self):
|
||||
# Tests must either cover every possiblity or
|
||||
# use a value other than the default
|
||||
config = linkcheck.configuration.Configuration()
|
||||
files = [get_file("config0.ini")]
|
||||
config.read(files)
|
||||
|
|
@ -55,7 +57,7 @@ class TestConfig(unittest.TestCase):
|
|||
self.assertEqual(config["maxrunseconds"], 1)
|
||||
self.assertEqual(config["maxfilesizeparse"], 100)
|
||||
self.assertEqual(config["maxfilesizedownload"], 100)
|
||||
self.assertEqual(config["resultcachesize"], 100000)
|
||||
self.assertEqual(config["resultcachesize"], 9999)
|
||||
# filtering section
|
||||
patterns = [x["pattern"].pattern for x in config["externlinks"]]
|
||||
for prefix in ("ignore_", "nofollow_"):
|
||||
|
|
|
|||
Loading…
Reference in a new issue