All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
9 # resolve_to_config_type,
10 # DEFAULT_TYPE_ATTRIBUTES,
22 # resolve_to_config_type,
23 # DEFAULT_TYPE_ATTRIBUTES,
25 from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
26 MyLovelyCompanyTeamProjectComponent # NOT DRY
28 from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
29 MyLovelyCompanyTeamProjectComponent as component # DRY
33 result = 1 # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
36 1 # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
40 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # aaa
43 result = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # aaa
76 # The type: ignore exception only applies to line length, not
77 # other types of formatting.
79 "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", # type: ignore
80 "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa"
85 @pytest.mark.parametrize(
86 ("post_data", "message"),
88 # metadata_version errors.
91 "None is an invalid value for Metadata-Version. Error: This field is"
93 " https://packaging.python.org/specifications/core-metadata"
96 {"metadata_version": "-1"},
97 "'-1' is an invalid value for Metadata-Version. Error: Unknown Metadata"
99 " https://packaging.python.org/specifications/core-metadata"
103 {"metadata_version": "1.2"},
104 "'' is an invalid value for Name. Error: This field is required. see"
105 " https://packaging.python.org/specifications/core-metadata"
108 {"metadata_version": "1.2", "name": "foo-"},
109 "'foo-' is an invalid value for Name. Error: Must start and end with a"
110 " letter or numeral and contain only ascii numeric and '.', '_' and"
111 " '-'. see https://packaging.python.org/specifications/core-metadata"
115 {"metadata_version": "1.2", "name": "example"},
116 "'' is an invalid value for Version. Error: This field is required. see"
117 " https://packaging.python.org/specifications/core-metadata"
120 {"metadata_version": "1.2", "name": "example", "version": "dog"},
121 "'dog' is an invalid value for Version. Error: Must start and end with"
122 " a letter or numeral and contain only ascii numeric and '.', '_' and"
123 " '-'. see https://packaging.python.org/specifications/core-metadata"
127 def test_fails_invalid_post_data(
128 self, pyramid_config, db_request, post_data, message
134 from .config import (
138 ConfigTypeAttributes,
142 # resolve_to_config_type,
143 # DEFAULT_TYPE_ATTRIBUTES,
147 from .config import (
151 ConfigTypeAttributes,
155 # resolve_to_config_type,
156 # DEFAULT_TYPE_ATTRIBUTES,
158 from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
159 MyLovelyCompanyTeamProjectComponent, # NOT DRY
161 from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
162 MyLovelyCompanyTeamProjectComponent as component, # DRY
166 result = 1 # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
168 result = 1 # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
171 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
175 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
186 a[-1], # type: ignore
188 c = call(0.0123, 0.0456, 0.0789, 0.0123, 0.0789, a[-1]) # type: ignore
199 a[-1], # type: ignore
202 # The type: ignore exception only applies to line length, not
203 # other types of formatting.
210 "aaaaaaaa", # type: ignore
221 @pytest.mark.parametrize(
222 ("post_data", "message"),
224 # metadata_version errors.
227 "None is an invalid value for Metadata-Version. Error: This field is"
229 " https://packaging.python.org/specifications/core-metadata",
232 {"metadata_version": "-1"},
233 "'-1' is an invalid value for Metadata-Version. Error: Unknown Metadata"
235 " https://packaging.python.org/specifications/core-metadata",
239 {"metadata_version": "1.2"},
240 "'' is an invalid value for Name. Error: This field is required. see"
241 " https://packaging.python.org/specifications/core-metadata",
244 {"metadata_version": "1.2", "name": "foo-"},
245 "'foo-' is an invalid value for Name. Error: Must start and end with a"
246 " letter or numeral and contain only ascii numeric and '.', '_' and"
247 " '-'. see https://packaging.python.org/specifications/core-metadata",
251 {"metadata_version": "1.2", "name": "example"},
252 "'' is an invalid value for Version. Error: This field is required. see"
253 " https://packaging.python.org/specifications/core-metadata",
256 {"metadata_version": "1.2", "name": "example", "version": "dog"},
257 "'dog' is an invalid value for Version. Error: Must start and end with"
258 " a letter or numeral and contain only ascii numeric and '.', '_' and"
259 " '-'. see https://packaging.python.org/specifications/core-metadata",
263 def test_fails_invalid_post_data(
264 self, pyramid_config, db_request, post_data, message