Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Drop pkg_resources #399

Merged
merged 2 commits into from
Mar 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
cleanup: remove the conditional check
The try/except was giving a True/False value to `HAS_DEXTERITY`, but it
was not being used on the code, hence tests would fail if the
distribution was not found.
gforcada committed Mar 19, 2025
commit 42f7e808c3fc069f2fb33abc1d78bc6450f8b209
16 changes: 3 additions & 13 deletions plone/app/layout/viewlets/tests/test_content.py
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
from plone.app.testing import TEST_USER_PASSWORD
from plone.base.interfaces import ISecuritySchema
from plone.base.interfaces import ISiteSchema
from plone.dexterity.fti import DexterityFTI
from plone.locking.interfaces import ILockable
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
@@ -18,19 +19,8 @@
from zope.intid.interfaces import IIntIds


try:
import pkg_resources

pkg_resources.get_distribution("plone.app.relationfield")
except pkg_resources.DistributionNotFound:
HAS_DEXTERITY = False
pass
else:
HAS_DEXTERITY = True
from plone.dexterity.fti import DexterityFTI

class IMyDexterityItem(Interface):
"""Dexterity test type"""
class IMyDexterityItem(Interface):
"""Dexterity test type"""


class TestDocumentBylineViewletView(ViewletsTestCase):