testOooInterface: use zope.interface built in verify utility
instead of re-implementing our own. Updating to zope.interface 5.4 caused test failures: File "cloudooo/handler/ooo/tests/testOooInterface.py", line 90, in testIOdfDocument self.assertEquals(IOdfDocument.names(), method_list) AssertionError: Lists differ: ['getFile', 'source_format', '... != ['getContentXml', 'parsed_cont... First differing element 0: 'getFile' 'getContentXml' - ['getFile', 'source_format', 'getContentXml', 'parsed_content'] + ['getContentXml', 'parsed_content', 'source_format', 'getFile'] This is because Interface.name() order is unspecified. As we could see in the XXX comments in the test, hardcoding the method names from the interface was not ideal, using the built-in verifyClass is better because it performs more checks and because error reporting is also much more detailed. cf. https://zopeinterface.readthedocs.io/en/latest/verify.html
Showing
Please register or sign in to comment