Skip to content

Commit c0eb00f

Browse files
authored
Merge pull request #150 from plone/remove-portal-properties-tool
Remove portal properties tool from tests
2 parents fd8a891 + bf177ba commit c0eb00f

File tree

8 files changed

+43
-20
lines changed

8 files changed

+43
-20
lines changed

.editorconfig

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
root = true
1414

1515

16-
[*] # For All Files
16+
[*]
17+
# Default settings for all files.
1718
# Unix-style newlines with a newline ending every file
1819
end_of_line = lf
1920
insert_final_newline = true
@@ -33,7 +34,8 @@ indent_size = 4
3334
# 2 space indentation
3435
indent_size = 2
3536

36-
[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}] # Frontend development
37+
[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}]
38+
# Frontend development
3739
# 2 space indentation
3840
indent_size = 2
3941
max_line_length = 80

.github/workflows/meta.yml

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ jobs:
5757
# os_dependencies = "git libxml2 libxslt"
5858
##
5959

60+
##
61+
# To test against a specific matrix of python versions
62+
# when running tests jobs, add in .meta.toml:
63+
# [github]
64+
# py_versions = "['3.12', '3.11']"
65+
##
66+
6067

6168
##
6269
# Specify additional jobs in .meta.toml:

.meta.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# See the inline comments on how to expand/tweak this configuration file
44
[meta]
55
template = "default"
6-
commit-id = "6e36bcc4"
6+
commit-id = "a89af8f2"
77

88
[pyproject]
99
dependencies_mappings = [

dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Generated from:
2+
# https://github.com/plone/meta/tree/main/config/default
3+
# See the inline comments on how to expand/tweak this configuration file
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
# Check for updates to GitHub Actions every week
11+
interval: "weekly"

news/125.tests

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Remove unused ``portal_properties`` code from tests.
2+
[maurits]

plone/app/querystring/tests/testQueryParser.py

-10
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,6 @@ def getPortalObject(self):
8484
return MockObject(uid="00000000000000000", path="/%s" % MOCK_SITE_ID)
8585

8686

87-
class MockNavtreeProperties:
88-
def getProperty(self, name, default=""):
89-
return ""
90-
91-
92-
class MockSiteProperties:
93-
navtree_properties = MockNavtreeProperties()
94-
95-
9687
@implementer(INavigationRoot, IPloneSiteRoot)
9788
class MockSite:
9889
def __init__(self, portal_membership=None):
@@ -104,7 +95,6 @@ def __init__(self, portal_membership=None):
10495
sm.registerUtility(portal_membership, IMembershipTool)
10596
self.portal_url = MockPortalUrl()
10697
sm.registerUtility(self.portal_url, IURLTool)
107-
self.portal_properties = MockSiteProperties()
10898

10999
def getPhysicalPath(self):
110100
return ["", MOCK_SITE_ID]

pyproject.toml

+10-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ target-version = ["py38"]
7171
##
7272

7373
[tool.codespell]
74-
ignore-words-list = "discreet,"
74+
ignore-words-list = "discreet,assertin,"
7575
skip = "*.po,"
7676
##
7777
# Add extra configuration options in .meta.toml:
@@ -134,20 +134,27 @@ python-dateutil = ['dateutil']
134134
[tool.check-manifest]
135135
ignore = [
136136
".editorconfig",
137+
".flake8",
137138
".meta.toml",
138139
".pre-commit-config.yaml",
139-
"tox.ini",
140-
".flake8",
140+
"dependabot.yml",
141141
"mx.ini",
142+
"tox.ini",
142143

143144
]
145+
144146
##
145147
# Add extra configuration options in .meta.toml:
146148
# [pyproject]
147149
# check_manifest_ignores = """
148150
# "*.map.js",
149151
# "*.pyc",
150152
# """
153+
# check_manifest_extra_lines = """
154+
# ignore-bad-ideas = [
155+
# "some/test/file/PKG-INFO",
156+
# ]
157+
# """
151158
##
152159

153160

tox.ini

+8-4
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ set_env =
109109
deps =
110110
zope.testrunner
111111
-c https://dist.plone.org/release/6.0-dev/constraints.txt
112-
112+
113113
##
114114
# Specify additional deps in .meta.toml:
115115
# [tox]
@@ -152,11 +152,12 @@ deps =
152152
coverage
153153
zope.testrunner
154154
-c https://dist.plone.org/release/6.0-dev/constraints.txt
155-
155+
156156
commands =
157157
coverage run --branch --source plone.app.querystring {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir} -s plone.app.querystring {posargs}
158158
coverage report -m --format markdown
159159
coverage xml
160+
coverage html
160161
extras =
161162
test
162163

@@ -169,7 +170,7 @@ deps =
169170
build
170171
towncrier
171172
-c https://dist.plone.org/release/6.0-dev/constraints.txt
172-
173+
173174
commands =
174175
# fake version to not have to install the package
175176
# we build the change log as news entries might break
@@ -182,6 +183,9 @@ commands =
182183
description = ensure there are no cyclic dependencies
183184
use_develop = true
184185
skip_install = false
186+
# Here we must always constrain the package deps to what is already installed,
187+
# otherwise we simply get the latest from PyPI, which may not work.
188+
constrain_package_deps = true
185189
set_env =
186190

187191
##
@@ -197,7 +201,7 @@ deps =
197201
pipdeptree
198202
pipforester
199203
-c https://dist.plone.org/release/6.0-dev/constraints.txt
200-
204+
201205
commands =
202206
# Generate the full dependency tree
203207
sh -c 'pipdeptree -j > forest.json'

0 commit comments

Comments
 (0)