mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Don't use default values in configuration tests
This commit is contained in:
parent
6dc5ade29d
commit
0c59cd5c1e
2 changed files with 4 additions and 2 deletions
|
|
@ -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