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
132 square = Square(4) # type: Optional[Square]
136 from .config import (
140 ConfigTypeAttributes,
144 # resolve_to_config_type,
145 # DEFAULT_TYPE_ATTRIBUTES,
149 from .config import (
153 ConfigTypeAttributes,
157 # resolve_to_config_type,
158 # DEFAULT_TYPE_ATTRIBUTES,
160 from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
161 MyLovelyCompanyTeamProjectComponent, # NOT DRY
163 from com.my_lovely_company.my_lovely_team.my_lovely_project.my_lovely_component import (
164 MyLovelyCompanyTeamProjectComponent as component, # DRY
168 result = 1 # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
170 result = 1 # look ma, no comment migration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
173 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
177 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
188 a[-1], # type: ignore
190 c = call(0.0123, 0.0456, 0.0789, 0.0123, 0.0789, a[-1]) # type: ignore
201 a[-1], # type: ignore
204 # The type: ignore exception only applies to line length, not
205 # other types of formatting.
212 "aaaaaaaa", # type: ignore
223 @pytest.mark.parametrize(
224 ("post_data", "message"),
226 # metadata_version errors.
230 "None is an invalid value for Metadata-Version. Error: This field"
232 " https://packaging.python.org/specifications/core-metadata"
236 {"metadata_version": "-1"},
238 "'-1' is an invalid value for Metadata-Version. Error: Unknown"
239 " Metadata Version see"
240 " https://packaging.python.org/specifications/core-metadata"
245 {"metadata_version": "1.2"},
247 "'' is an invalid value for Name. Error: This field is required."
248 " see https://packaging.python.org/specifications/core-metadata"
252 {"metadata_version": "1.2", "name": "foo-"},
254 "'foo-' is an invalid value for Name. Error: Must start and end"
255 " with a letter or numeral and contain only ascii numeric and '.',"
257 " https://packaging.python.org/specifications/core-metadata"
262 {"metadata_version": "1.2", "name": "example"},
264 "'' is an invalid value for Version. Error: This field is required."
265 " see https://packaging.python.org/specifications/core-metadata"
269 {"metadata_version": "1.2", "name": "example", "version": "dog"},
271 "'dog' is an invalid value for Version. Error: Must start and end"
272 " with a letter or numeral and contain only ascii numeric and '.',"
274 " https://packaging.python.org/specifications/core-metadata"
279 def test_fails_invalid_post_data(
280 self, pyramid_config, db_request, post_data, message
284 square = Square(4) # type: Optional[Square]