Commit 36c68a85b96d400285776d1575eb62290cfb16ab

Authored by Christian Herdtweck
1 parent 633f5252

tests: Avoid fail of ftguess tests for excel4 samples

Showing 1 changed file with 10 additions and 1 deletions
tests/ftguess/test_basic.py
... ... @@ -54,7 +54,7 @@ class TestFTGuess(unittest.TestCase):
54 54 .format(filename))
55 55 extension = extension[1:] # remove the leading '.'
56 56  
57   - # encrypted files are mostly recognized (yet?), except .xls
  57 + # encrypted files are mostly not recognized (yet?), except .xls
58 58 if filename.startswith('encrypted/'):
59 59 if extension == 'xls':
60 60 expect = ftguess.FType_Excel97
... ... @@ -65,9 +65,18 @@ class TestFTGuess(unittest.TestCase):
65 65 # not really an office file type
66 66 expect = ftguess.FType_Unknown
67 67  
  68 + elif extension == 'slk':
  69 + # not implemented yet
  70 + expect = ftguess.FType_Unknown
  71 +
68 72 elif filename == 'basic/encrypted.docx':
69 73 expect = ftguess.FType_Generic_OLE
70 74  
  75 + elif 'excel5' in filename:
  76 + # excel5 and excel97 have the same extensions, so we did not
  77 + # include excel5 in "used_types" above.
  78 + expect = ftguess.FType_Excel5
  79 +
71 80 else:
72 81 # other files behave nicely, so extension determines the type
73 82 expect = ftype_for_extension[extension]
... ...