Ticket #243 (closed task: fixed)
Fix plumi.content doctests
| Reported by: | andycat | Owned by: | dimo |
|---|---|---|---|
| Priority: | major | Milestone: | 3.0-beta2 |
| Component: | PlumiVideoProduct | Keywords: | |
| Cc: | Who will test this: |
Description
Currently we only have doctests for plumi.content egg, and they fail.
Also, we dont have doctests for any other plumi.* package. For the purposes of the this ticket, tasks are 1) bugfix plumi.content doctest - plumi.content/plumi/content/README.txt
2) simply make doctest framework for other eggs, and then lodge new tickets for developing tests cases themselves.
Attachments
Change History
comment:2 Changed 3 years ago by andycat
I belive it is because plumicallout/plumivideo are not globally addable, inside the test browser plone site, at the location where the test user is trying to add them.
comment:4 Changed 3 years ago by andycat
- Milestone changed from 0.3alpha - Plumi to Plone 3 to 3.0-beta
comment:6 Changed 2 years ago by dimo
- Owner set to dimo
I spent quite a lot of time fixing the plumi.content doctests. Now the first 342 lines (out of 589) work with no errors http://dev.plone.org/collective/changeset/109746
comment:7 Changed 2 years ago by dimo
- Summary changed from Fix plumi.content doctests, and develop plumi.app / plumi.skin doc tests to Fix plumi.content doctests
let's fix the existing plumi.content doctests for the moment and see what additional testing we need in future milestones
comment:8 Changed 2 years ago by dimo
- Status changed from new to closed
- Resolution set to fixed
All the doctests seem to work fine: http://dev.plone.org/collective/changeset/110036

The failing doctest is (running in debug mode, so it drops to pdb)
NAK-Factory:plumi-0.3 andycat$ ./bin/instance test -s plumi.content -t README.txt -D Running tests at level 1 Running Products.PloneTestCase.layer.PloneSite tests: /Users/andycat/.buildout/eggs/collective.contentlicensing-2.2.0-py2.4.egg/collective/contentlicensing/browser/contentlicensingprefs.py:36: DeprecationWarning: FormFieldsets is deprecated. The convenience import confuses the test coverage tools. Please use the fully qualified name instead. from plone.fieldsets import FormFieldsets /users/andycat/src/plumi-0.3/src/plumi.skin/plumi/skin/browser/portlets/recent_callouts.py:8: DeprecationWarning: BrowserView: Products.CMFPlone.utils.BrowserView will be removed in Plone 4.0. Please use Products.Five.BrowserView instead. class RecentCalloutsPortlet(utils.BrowserView): /users/andycat/src/plumi-0.3/src/plumi.skin/plumi/skin/browser/portlets/recent_comments.py:8: DeprecationWarning: BrowserView: Products.CMFPlone.utils.BrowserView will be removed in Plone 4.0. Please use Products.Five.BrowserView instead. class RecentCommentPortlet(utils.BrowserView): /users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/configuration/fields.py:417: UserWarning: You did not specify an i18n translation domain for the 'description' field in /Users/andycat/.buildout/eggs/Products.ATVocabularyManager-1.4.2-py2.4.egg/Products/ATVocabularyManager/configure.zcml warnings.warn( /users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/configuration/fields.py:417: UserWarning: You did not specify an i18n translation domain for the 'title' field in /Users/andycat/.buildout/eggs/Products.ATVocabularyManager-1.4.2-py2.4.egg/Products/ATVocabularyManager/configure.zcml warnings.warn( /Users/andycat/.buildout/eggs/contentratings-1.0_beta1-py2.4.egg/contentratings/browser/bbb/__init__.py:16: DeprecationWarning: IEditorialRatingView is deprecated. The old style rating views are no longer intended to be used.Use the aggregator and rating views instead. This interface will go away in version 1.1 from contentratings.browser.interfaces import IEditorialRatingView /users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/configuration/config.py:692: DeprecationWarning: The five:traversable statement is no longer needed and will be removed in Zope 2.12. actions = self.handler(context, **args) /users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/configuration/config.py:184: DeprecationWarning: zope.app.event.interfaces has moved to zope.lifecycleevent.interfaces. Import of zope.app.event.interfaces will become unsupported in Zope 3.5 mod = __import__(mname, *_import_chickens) /users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/configuration/xmlconfig.py:323: DeprecationWarning: zope.app.annotation has moved to zope.annotation. Import of zope.app.annotation will become unsupported in Zope 3.5 __import__(arguments[0]) Set up Products.PloneTestCase.layer.ZCML in 13.895 seconds. Installing plumi.content ... done (0.033s) /Users/andycat/.buildout/eggs/Products.PlonePAS-3.9-py2.4.egg/Products/PlonePAS/setuphandlers.py:39: DeprecationWarning: portal_groups.getGroupIds is deprecated and will be removed in Plone 4.0. Use PAS searchGroups instead existing = gtool.listGroupIds() Set up Products.PloneTestCase.layer.PloneSite in 26.871 seconds. Running: .............................................................. Error in test /users/andycat/src/plumi-0.3/src/plumi.content/plumi/content/README.txt Traceback (most recent call last): File "/users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/testing/doctest.py", line 2395, in debug runner.run(self._dt_test, clear_globs=False) File "/users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/testing/doctest.py", line 1826, in run r = DocTestRunner.run(self, test, compileflags, out, False) File "/users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/testing/doctest.py", line 1484, in run return self.__run(test, compileflags, out) File "/users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/testing/doctest.py", line 1402, in __run exc_info) File "/users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/testing/doctest.py", line 1832, in report_unexpected_exception raise UnexpectedException(test, example, exc_info) UnexpectedException: <DocTest README.txt from /users/andycat/src/plumi-0.3/src/plumi.content/plumi/content/README.txt:0 (167 examples)> exceptions.LookupError: label 'Plumi Call Out' > /users/andycat/src/plumi-0.3/parts/zope2/lib/python/zope/testbrowser/browser.py(50)disambiguate() -> raise LookupError(msg) (Pdb)