From 36c68a85b96d400285776d1575eb62290cfb16ab Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Wed, 20 Apr 2022 11:50:00 +0200 Subject: [PATCH] tests: Avoid fail of ftguess tests for excel4 samples --- tests/ftguess/test_basic.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/ftguess/test_basic.py b/tests/ftguess/test_basic.py index 1faef0c..3c63118 100644 --- a/tests/ftguess/test_basic.py +++ b/tests/ftguess/test_basic.py @@ -54,7 +54,7 @@ class TestFTGuess(unittest.TestCase): .format(filename)) extension = extension[1:] # remove the leading '.' - # encrypted files are mostly recognized (yet?), except .xls + # encrypted files are mostly not recognized (yet?), except .xls if filename.startswith('encrypted/'): if extension == 'xls': expect = ftguess.FType_Excel97 @@ -65,9 +65,18 @@ class TestFTGuess(unittest.TestCase): # not really an office file type expect = ftguess.FType_Unknown + elif extension == 'slk': + # not implemented yet + expect = ftguess.FType_Unknown + elif filename == 'basic/encrypted.docx': expect = ftguess.FType_Generic_OLE + elif 'excel5' in filename: + # excel5 and excel97 have the same extensions, so we did not + # include excel5 in "used_types" above. + expect = ftguess.FType_Excel5 + else: # other files behave nicely, so extension determines the type expect = ftype_for_extension[extension] -- libgit2 0.21.4