Skip to content

Commit

Permalink
Merge d4beacb into 4427dc7
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Sep 28, 2020
2 parents 4427dc7 + d4beacb commit 0c0680d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 20 deletions.
16 changes: 11 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@ python:
- 3.6
- 3.7
- 3.8
env:
TOXENV=py
matrix:
include:
- python: "3.8"
name: lint
env: TOXENV=lint
after_success:
install:
- pip install -U pip setuptools tox
- pip install coveralls coverage
- pip install -U setuptools
- pip install zc.buildout
- buildout bootstrap
- buildout
script:
- coverage run bin/test --all -v
- tox
after_success:
- coverage combine
- coveralls
notifications:
email: false
Expand Down
2 changes: 1 addition & 1 deletion Products/CMFUid/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class UidEventZCMLLayer(ZopeLite):

@classmethod
def testSetUp(cls):
import Products
import OFS
import Products

zcml.load_config('meta.zcml', Products.Five)
zcml.load_config('event.zcml', OFS)
Expand Down
8 changes: 4 additions & 4 deletions Products/CMFUid/tests/test_uidannotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class UniqueIdAnnotationToolTests(SecurityTest):
layer = UidEventZCMLLayer

def _getTargetClass(self):
from Products.CMFUid.UniqueIdAnnotationTool \
import UniqueIdAnnotationTool
from Products.CMFUid.UniqueIdAnnotationTool import \
UniqueIdAnnotationTool

return UniqueIdAnnotationTool

Expand All @@ -80,6 +80,7 @@ def _makeOne(self, *args, **kw):

def setUp(self):
from Products.CMFUid.interfaces import IUniqueIdAnnotationManagement

from Products.CMFCore.utils import registerToolInterface

SecurityTest.setUp(self)
Expand Down Expand Up @@ -117,8 +118,7 @@ def _promiscuous(*args, **kw):
def test_interfaces(self):
from Products.CMFUid.interfaces import IUniqueIdAnnotation
from Products.CMFUid.interfaces import IUniqueIdAnnotationManagement
from Products.CMFUid.UniqueIdAnnotationTool \
import UniqueIdAnnotation
from Products.CMFUid.UniqueIdAnnotationTool import UniqueIdAnnotation

verifyClass(IUniqueIdAnnotationManagement, self._getTargetClass())
verifyClass(IUniqueIdAnnotation, UniqueIdAnnotation)
Expand Down
3 changes: 1 addition & 2 deletions Products/CMFUid/tests/test_uidgeneration.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
class UniqueIdGeneratorToolTests(SecurityTest):

def _getTargetClass(self):
from Products.CMFUid.UniqueIdGeneratorTool \
import UniqueIdGeneratorTool
from Products.CMFUid.UniqueIdGeneratorTool import UniqueIdGeneratorTool

return UniqueIdGeneratorTool

Expand Down
10 changes: 5 additions & 5 deletions Products/CMFUid/tests/test_uidhandling.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ def _makeOne(self, *args, **kw):
return self._getTargetClass()(*args, **kw)

def setUp(self):
from Products.CMFUid.interfaces import IUniqueIdHandler
from Products.CMFUid.UniqueIdAnnotationTool import \
UniqueIdAnnotationTool
from Products.CMFUid.UniqueIdGeneratorTool import UniqueIdGeneratorTool

from Products.CMFCore.CatalogTool import CatalogTool
from Products.CMFCore.utils import registerToolInterface
from Products.CMFUid.interfaces import IUniqueIdHandler
from Products.CMFUid.UniqueIdAnnotationTool \
import UniqueIdAnnotationTool
from Products.CMFUid.UniqueIdGeneratorTool \
import UniqueIdGeneratorTool

SecurityTest.setUp(self)
self.app._setObject('dummy', DummyContent(id='dummy'))
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ combine_as_imports = True
sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
known_first_party = Products.CMFCore
known_third_party = six, docutils
known_zope = OFS, Products
default_section = ZOPE
line_length = 79
lines_after_imports = 2
not_skip =
__init__.py

[flake8]
no-accept-encodings = True
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ basepython = python3
commands_pre =
mkdir -p {toxinidir}/parts/flake8
commands =
- isort --check-only --diff --recursive {toxinidir}/Products setup.py
- isort --check-only --diff {toxinidir}/Products setup.py
- flake8 --format=html Products setup.py
flake8 Products setup.py
deps =
Expand Down

0 comments on commit 0c0680d

Please sign in to comment.