Commits

Anonymous committed 0cd5b37

Fixed 2.4 incompatibility in a test

  • Participants
  • Parent commits 4537746

Comments (0)

Files changed (1)

File functional_tests/doc_tests/test_init_plugin/init_plugin.rst

     ...         """Widgets might like cheese"""
     ...         self.widget.likes_cheese()
     ...     def shortDescription(self): # 2.7 compat
-    ...         doc = self._testMethodDoc
+    ...         try:
+    ...             doc = self._testMethodDoc
+    ...         except AttributeError:
+    ...             # 2.4 compat
+    ...             doc = self._TestCase__testMethodDoc
     ...         return doc and doc.split("\n")[0].strip() or None
 
 The tests are bundled into a suite that we can pass to the test runner.