mirror of https://github.com/tLDP/python-tldp
deliberately test the ISO-8859-1 file
This commit is contained in:
parent
d922c04d02
commit
7904944e09
|
@ -14,6 +14,13 @@ import example
|
|||
from tldp.typeguesser import guess
|
||||
from tldp.doctypes.common import SignatureChecker
|
||||
|
||||
# -- shorthand
|
||||
opj = os.path.join
|
||||
opd = os.path.dirname
|
||||
opa = os.path.abspath
|
||||
|
||||
sampledocs = opj(opd(__file__), 'sample-documents')
|
||||
|
||||
|
||||
def genericGuessTest(content, ext):
|
||||
tf = ntf(prefix='tldp-guesser-test-', suffix=ext, delete=False)
|
||||
|
@ -27,6 +34,10 @@ def genericGuessTest(content, ext):
|
|||
|
||||
class TestDoctypes(unittest.TestCase):
|
||||
|
||||
def testISO_8859_1(self):
|
||||
dt = guess(opj(sampledocs, 'ISO-8859-1.sgml'))
|
||||
self.assertIsNotNone(dt)
|
||||
|
||||
def testDetectionBySignature(self):
|
||||
for ex in example.sources:
|
||||
if isinstance(ex.doctype, SignatureChecker):
|
||||
|
|
Loading…
Reference in New Issue