Skip to content

Commit

Permalink
Merge pull request #52 from plone/roto-fix-layersetup-doctests
Browse files Browse the repository at this point in the history
Fix now-false doctests on layer setup port selection
  • Loading branch information
gforcada authored Oct 4, 2018
2 parents 5c3849b + 2a5b210 commit b426d40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ New features:

Bug fixes:

- *add item here*
- Amended the doctests to work with automatical layer port picking from plone.testing.
[Rotonen]


5.0.8 (2017-10-25)
Expand Down
6 changes: 2 additions & 4 deletions plone/app/testing/layers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ indicate where Zope is running.

>>> port = layers.PLONE_ZSERVER['port']
>>> import os
>>> port == int(os.environ.get('ZSERVER_PORT', 55001))
True
>>> # port == int(os.environ.get('ZSERVER_PORT', 0))

Let's now simulate a test. Test setup does nothing beyond what the base layers
do.
Expand Down Expand Up @@ -407,8 +406,7 @@ indicate where Zope is running.

>>> port = layers.PLONE_FTP_SERVER['port']
>>> import os
>>> port == int(os.environ.get('FTPSERVER_PORT', 55002))
True
>>> # port == int(os.environ.get('FTPSERVER_PORT', 0))

Let's now simulate a test. Test setup does nothing beyond what the base layers
do.
Expand Down

1 comment on commit b426d40

@jenkins-plone-org
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gforcada Jenkins CI reporting about code analysis
See the full report here: https://jenkins.plone.org/job/package-plone.app.testing/68/violations

plone/app/testing/bbb.py:55:1: E305 expected 2 blank lines after class or function definition, found 1
plone/app/testing/bbb.py:99:9: Q001 Remove bad quotes from multiline string.
plone/app/testing/layers.py:106:32: C812 missing trailing comma
plone/app/testing/layers.py:141:45: C812 missing trailing comma
plone/app/testing/layers.py:167:21: D001 found xmlconfig.file( replace it with self.loadZCML(
plone/app/testing/layers.py:203:11: T000 Todo note found.
plone/app/testing/layers.py:227:15: C812 missing trailing comma
plone/app/testing/layers.py:253:31: C812 missing trailing comma
plone/app/testing/layers.py:264:1: E305 expected 2 blank lines after class or function definition, found 1
plone/app/testing/layers.py:358:39: C812 missing trailing comma
plone/app/testing/layers.py:380:1: E305 expected 2 blank lines after class or function definition, found 1
plone/app/testing/layers.py:382:29: C812 missing trailing comma
plone/app/testing/layers.py:386:28: C812 missing trailing comma
plone/app/testing/layers.py:391:25: C812 missing trailing comma
plone/app/testing/layers.py:395:27: C812 missing trailing comma
plone/app/testing/bbb_at.py:55:1: E305 expected 2 blank lines after class or function definition, found 1
plone/app/testing/bbb_at.py:99:9: Q001 Remove bad quotes from multiline string.
plone/app/testing/cleanup.py:39:1: E305 expected 2 blank lines after class or function definition, found 1
plone/app/testing/selenium_layers.py:21:35: C812 missing trailing comma
plone/app/testing/selenium_layers.py:32:1: E305 expected 2 blank lines after class or function definition, found 1
plone/app/testing/helpers.py:432:16: D001 found xmlconfig.file( replace it with self.loadZCML(
plone/app/testing/helpers.py:442:25: C812 missing trailing comma
plone/app/testing/helpers.py:488:41: C812 missing trailing comma

Follow these instructions to reproduce it locally.

Please sign in to comment.