Skip to content

Commit

Permalink
[fc] Repository: plone.app.z3cform
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2016-01-29T16:39:24+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/plone.app.z3cform@e4674df

Use doctest instead of zope.testing.doctest and adapt test to changes in Five

Files changed:
M CHANGES.rst
M plone/app/z3cform/inline_validation.rst
M plone/app/z3cform/tests/tests.py
Repository: plone.app.z3cform
Branch: refs/heads/master
Date: 2016-01-29T16:40:08+01:00
Author: Johannes Raggam (thet) <thetetet@gmail.com>
Commit: plone/plone.app.z3cform@549e2e2

make test output work with Zope2 and Zope4

Files changed:
M CHANGES.rst
M plone/app/z3cform/inline_validation.rst
Repository: plone.app.z3cform
Branch: refs/heads/master
Date: 2016-01-29T16:40:31+01:00
Author: Johannes Raggam (thet) <thetetet@gmail.com>
Commit: plone/plone.app.z3cform@5fb4e9a

Merge pull request #38 from plone/thet-zope4

Zope4

Files changed:
M CHANGES.rst
M plone/app/z3cform/inline_validation.rst
M plone/app/z3cform/tests/tests.py
  • Loading branch information
thet committed Jan 29, 2016
1 parent df70b54 commit c72e268
Showing 1 changed file with 189 additions and 117 deletions.
306 changes: 189 additions & 117 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,164 +1,236 @@
Repository: plone.registry
Repository: plone.app.z3cform


Branch: refs/heads/master
Date: 2016-01-25T17:57:40+01:00
Author: Johannes Raggam (thet) <thetetet@gmail.com>
Commit: https://github.com/plone/plone.registry/commit/6417aed485291339df7f1929c9a8a3fb1dd205cb
Date: 2016-01-29T16:39:24+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.app.z3cform/commit/e4674df798bbf5913bf43440a61ffd1f38c026ea

Replace deprecated zope.testing.doctestunit import with doctest module from stdlib.
Use doctest instead of zope.testing.doctest and adapt test to changes in Five

Files changed:
M CHANGES.rst
M plone/registry/tests.py
M setup.py
M plone/app/z3cform/inline_validation.rst
M plone/app/z3cform/tests/tests.py

diff --git a/CHANGES.rst b/CHANGES.rst
index f22ed03..4995b04 100644
index 6d1b30d..58d146f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,6 +6,10 @@ Changelog
@@ -12,6 +12,8 @@ Fixes:

Fixes:
- Fix ajax selection for add forms
[tomgross]
+- Use doctest instead of zope.testing.doctest
+ [pbauer]

+- Replace deprecated ``zope.testing.doctestunit`` import with ``doctest``
+ module from stdlib.
+ [thet]
+
- Cleanup: Pep8, utf8 headers, whitespace fixes, readability, ReST-fixes,
doc-style, etc.
[jensens]
diff --git a/plone/registry/tests.py b/plone/registry/tests.py
index 5676dc4..afca760 100644
--- a/plone/registry/tests.py
+++ b/plone/registry/tests.py
@@ -6,7 +6,6 @@
from zope.component import provideAdapter
from zope.component import testing
from zope.interface import Interface
-from zope.testing import doctestunit
import doctest

1.1.8 (2016-01-08)
diff --git a/plone/app/z3cform/inline_validation.rst b/plone/app/z3cform/inline_validation.rst
index e1ab6bf..42d322b 100644
--- a/plone/app/z3cform/inline_validation.rst
+++ b/plone/app/z3cform/inline_validation.rst
@@ -67,7 +67,7 @@ Let's verify that worked:
>>> context._REQUEST = request # evil test fake
>>> formWrapper = getMultiAdapter((context, request), name=u"test-form")
>>> formWrapper
- <Products.Five.metaclass.MyFormWrapper object ...>
+ <Products.Five.browser.metaconfigure.MyFormWrapper object ...>
>>> formWrapper.form
<class 'plone.app.z3cform.tests.example.MyForm'>

diff --git a/plone/app/z3cform/tests/tests.py b/plone/app/z3cform/tests/tests.py
index dd25a64..5ffbbc4 100644
--- a/plone/app/z3cform/tests/tests.py
+++ b/plone/app/z3cform/tests/tests.py
@@ -2,9 +2,9 @@
from plone.browserlayer.layer import mark_layer
from zope.traversing.interfaces import BeforeTraverseEvent

+import doctest
import unittest
import zope.component.testing
-import zope.testing.doctest

@@ -131,21 +130,21 @@ def test_auto_migration(self):
ROBOT_TEST_LEVEL = 5

@@ -36,31 +36,31 @@ def test_content_provider(self):

def test_suite():
return unittest.TestSuite([
- doctestunit.DocFileSuite(

- inlineValidationTests = zope.testing.doctest.DocFileSuite(
+ inlineValidationTests = doctest.DocFileSuite(
'inline_validation.rst',
package='plone.app.z3cform',
optionflags=(
- zope.testing.doctest.ELLIPSIS |
- zope.testing.doctest.NORMALIZE_WHITESPACE
+ doctest.ELLIPSIS |
+ doctest.NORMALIZE_WHITESPACE
)
)
inlineValidationTests.layer = PAZ3CForm_INTEGRATION_TESTING

suite = unittest.TestSuite([
unittest.makeSuite(IntegrationTests),
- zope.testing.doctest.DocFileSuite(
+ doctest.DocFileSuite(
'registry.rst',
package='plone.registry',
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
setUp=setUp,
tearDown=testing.tearDown
'wysiwyg/README.rst',
package='plone.app.z3cform',
setUp=zope.component.testing.setUp,
tearDown=zope.component.testing.tearDown,
),
- doctestunit.DocFileSuite(
- zope.testing.doctest.DocFileSuite(
+ doctest.DocFileSuite(
'events.rst',
package='plone.registry',
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
setUp=setUp,
tearDown=testing.tearDown
'queryselect/README.rst',
package='plone.app.z3cform',
setUp=zope.component.testing.setUp,
tearDown=zope.component.testing.tearDown,
),
- doctestunit.DocFileSuite(
+ doctest.DocFileSuite(
'field.rst',
package='plone.registry',
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
diff --git a/setup.py b/setup.py
index 5b7709a..f5e715c 100644
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,6 @@ def read(*rnames):
'zope.event',
'zope.interface',
'zope.schema',
- 'zope.testing',
],
entry_points="""
# -*- Entry points: -*-


Repository: plone.registry
- zope.testing.doctest.DocTestSuite(
+ doctest.DocTestSuite(
'plone.app.z3cform.wysiwyg.widget',
package='plone.app.z3cform',
setUp=zope.component.testing.setUp,


Repository: plone.app.z3cform


Branch: refs/heads/master
Date: 2016-01-29T16:38:22+01:00
Date: 2016-01-29T16:40:08+01:00
Author: Johannes Raggam (thet) <thetetet@gmail.com>
Commit: https://github.com/plone/plone.registry/commit/152c107503de11c8af73f86b87e03c2aea5ff3a3
Commit: https://github.com/plone/plone.app.z3cform/commit/549e2e2f10c5eb6d21747f2ba2489a372a8e25a3

Merge pull request #7 from plone/thet-zope4
make test output work with Zope2 and Zope4

Files changed:
M CHANGES.rst
M plone/app/z3cform/inline_validation.rst

diff --git a/CHANGES.rst b/CHANGES.rst
index 58d146f..3b18d90 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -12,6 +12,7 @@ Fixes:

- Fix ajax selection for add forms
[tomgross]
+
- Use doctest instead of zope.testing.doctest
[pbauer]

diff --git a/plone/app/z3cform/inline_validation.rst b/plone/app/z3cform/inline_validation.rst
index 42d322b..b1379ce 100644
--- a/plone/app/z3cform/inline_validation.rst
+++ b/plone/app/z3cform/inline_validation.rst
@@ -67,7 +67,7 @@ Let's verify that worked:
>>> context._REQUEST = request # evil test fake
>>> formWrapper = getMultiAdapter((context, request), name=u"test-form")
>>> formWrapper
- <Products.Five.browser.metaconfigure.MyFormWrapper object ...>
+ <Products.Five...MyFormWrapper object ...>
>>> formWrapper.form
<class 'plone.app.z3cform.tests.example.MyForm'>



Repository: plone.app.z3cform


Branch: refs/heads/master
Date: 2016-01-29T16:40:31+01:00
Author: Johannes Raggam (thet) <thetetet@gmail.com>
Commit: https://github.com/plone/plone.app.z3cform/commit/5fb4e9a8d1fe279f4e1b1c8f75ef29ab6b3d90be

Merge pull request #38 from plone/thet-zope4

Zope4

Files changed:
M CHANGES.rst
M plone/registry/tests.py
M setup.py
M plone/app/z3cform/inline_validation.rst
M plone/app/z3cform/tests/tests.py

diff --git a/CHANGES.rst b/CHANGES.rst
index f22ed03..4995b04 100644
index 6d1b30d..3b18d90 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,6 +6,10 @@ Changelog

Fixes:
@@ -13,6 +13,9 @@ Fixes:
- Fix ajax selection for add forms
[tomgross]

+- Replace deprecated ``zope.testing.doctestunit`` import with ``doctest``
+ module from stdlib.
+ [thet]
+- Use doctest instead of zope.testing.doctest
+ [pbauer]
+
- Cleanup: Pep8, utf8 headers, whitespace fixes, readability, ReST-fixes,
doc-style, etc.
[jensens]
diff --git a/plone/registry/tests.py b/plone/registry/tests.py
index 5676dc4..afca760 100644
--- a/plone/registry/tests.py
+++ b/plone/registry/tests.py
@@ -6,7 +6,6 @@
from zope.component import provideAdapter
from zope.component import testing
from zope.interface import Interface
-from zope.testing import doctestunit
import doctest

1.1.8 (2016-01-08)
------------------
diff --git a/plone/app/z3cform/inline_validation.rst b/plone/app/z3cform/inline_validation.rst
index e1ab6bf..b1379ce 100644
--- a/plone/app/z3cform/inline_validation.rst
+++ b/plone/app/z3cform/inline_validation.rst
@@ -67,7 +67,7 @@ Let's verify that worked:
>>> context._REQUEST = request # evil test fake
>>> formWrapper = getMultiAdapter((context, request), name=u"test-form")
>>> formWrapper
- <Products.Five.metaclass.MyFormWrapper object ...>
+ <Products.Five...MyFormWrapper object ...>
>>> formWrapper.form
<class 'plone.app.z3cform.tests.example.MyForm'>

diff --git a/plone/app/z3cform/tests/tests.py b/plone/app/z3cform/tests/tests.py
index dd25a64..5ffbbc4 100644
--- a/plone/app/z3cform/tests/tests.py
+++ b/plone/app/z3cform/tests/tests.py
@@ -2,9 +2,9 @@
from plone.browserlayer.layer import mark_layer
from zope.traversing.interfaces import BeforeTraverseEvent

+import doctest
import unittest
import zope.component.testing
-import zope.testing.doctest

@@ -131,21 +130,21 @@ def test_auto_migration(self):
ROBOT_TEST_LEVEL = 5

@@ -36,31 +36,31 @@ def test_content_provider(self):

def test_suite():
return unittest.TestSuite([
- doctestunit.DocFileSuite(

- inlineValidationTests = zope.testing.doctest.DocFileSuite(
+ inlineValidationTests = doctest.DocFileSuite(
'inline_validation.rst',
package='plone.app.z3cform',
optionflags=(
- zope.testing.doctest.ELLIPSIS |
- zope.testing.doctest.NORMALIZE_WHITESPACE
+ doctest.ELLIPSIS |
+ doctest.NORMALIZE_WHITESPACE
)
)
inlineValidationTests.layer = PAZ3CForm_INTEGRATION_TESTING

suite = unittest.TestSuite([
unittest.makeSuite(IntegrationTests),
- zope.testing.doctest.DocFileSuite(
+ doctest.DocFileSuite(
'registry.rst',
package='plone.registry',
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
setUp=setUp,
tearDown=testing.tearDown
'wysiwyg/README.rst',
package='plone.app.z3cform',
setUp=zope.component.testing.setUp,
tearDown=zope.component.testing.tearDown,
),
- doctestunit.DocFileSuite(
- zope.testing.doctest.DocFileSuite(
+ doctest.DocFileSuite(
'events.rst',
package='plone.registry',
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
setUp=setUp,
tearDown=testing.tearDown
'queryselect/README.rst',
package='plone.app.z3cform',
setUp=zope.component.testing.setUp,
tearDown=zope.component.testing.tearDown,
),
- doctestunit.DocFileSuite(
+ doctest.DocFileSuite(
'field.rst',
package='plone.registry',
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
diff --git a/setup.py b/setup.py
index 5b7709a..f5e715c 100644
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,6 @@ def read(*rnames):
'zope.event',
'zope.interface',
'zope.schema',
- 'zope.testing',
],
entry_points="""
# -*- Entry points: -*-
- zope.testing.doctest.DocTestSuite(
+ doctest.DocTestSuite(
'plone.app.z3cform.wysiwyg.widget',
package='plone.app.z3cform',
setUp=zope.component.testing.setUp,


0 comments on commit c72e268

Please sign in to comment.