mirror of https://github.com/fail2ban/fail2ban
TST pragma: no cover for missing json or for py2.5 json
parent
e12d389c65
commit
911eb45557
|
@ -29,7 +29,7 @@ import unittest, logging, sys, time, os
|
||||||
|
|
||||||
if sys.version_info >= (2, 6):
|
if sys.version_info >= (2, 6):
|
||||||
import json
|
import json
|
||||||
else:
|
else: # pragma: no cover
|
||||||
try:
|
try:
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -184,7 +184,7 @@ tests.addTest(unittest.makeSuite(datedetectortestcase.DateDetectorTest))
|
||||||
if json:
|
if json:
|
||||||
# Filter Regex tests with sample logs
|
# Filter Regex tests with sample logs
|
||||||
tests.addTest(unittest.makeSuite(samplestestcase.FilterSamplesRegex))
|
tests.addTest(unittest.makeSuite(samplestestcase.FilterSamplesRegex))
|
||||||
else:
|
else: # pragma: no cover
|
||||||
print "I: Skipping filter samples testing. No simplejson/json module"
|
print "I: Skipping filter samples testing. No simplejson/json module"
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue