Skip to content

Commit 8deb47f

Browse files
committed
remove redundant issues, which are already included in invalid_project, from invalid_project_dep_name
1 parent 6676437 commit 8deb47f

File tree

2 files changed

+5
-46
lines changed

2 files changed

+5
-46
lines changed

tests/console/commands/test_check.py

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -137,33 +137,13 @@ def test_check_invalid_dep_name_same_as_project_name(
137137
),
138138
new_callable=mocker.PropertyMock,
139139
)
140-
tester.execute("--lock")
141-
fastjsonschema_error = "data must contain ['description'] properties"
142-
custom_error = "The fields ['description'] are required in package mode."
143-
expected_template = """\
140+
tester.execute("")
141+
142+
expected = """\
144143
Error: Project name (invalid) is same as one of its dependencies
145-
Error: Unrecognized classifiers: ['Intended Audience :: Clowns'].
146-
Error: Declared README file does not exist: never/exists.md
147-
Error: Invalid source "exists" referenced in dependencies.
148-
Error: Invalid source "not-exists" referenced in dependencies.
149-
Error: Invalid source "not-exists2" referenced in dependencies.
150-
Error: poetry.lock was not found.
151-
Warning: A wildcard Python dependency is ambiguous.\
152-
Consider specifying a more explicit one.
153-
Warning: The "pendulum" dependency specifies the "allows-prereleases" property,\
154-
which is deprecated. Use "allow-prereleases" instead.
155-
Warning: Deprecated classifier 'Natural Language :: Ukranian'.\
156-
Must be replaced by ['Natural Language :: Ukrainian'].
157-
Warning: Deprecated classifier\
158-
'Topic :: Communications :: Chat :: AOL Instant Messenger'.\
159-
Must be removed.
160144
"""
161-
expected = {
162-
expected_template.format(schema_error=schema_error)
163-
for schema_error in (fastjsonschema_error, custom_error)
164-
}
165145

166-
assert tester.io.fetch_error() in expected
146+
assert tester.io.fetch_error() == expected
167147

168148

169149
def test_check_invalid(
Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,7 @@
11
[project]
22
name = "invalid"
33
version = "1.0.0"
4-
license = { text = "INVALID" }
5-
classifiers = [
6-
"Environment :: Console",
7-
"Intended Audience :: Clowns",
8-
"Natural Language :: Ukranian",
9-
"Topic :: Communications :: Chat :: AOL Instant Messenger",
10-
]
11-
dynamic = [ "readme", "dependencies", "requires-python" ]
12-
13-
[tool.poetry]
14-
readme = "never/exists.md"
4+
dynamic = ["dependencies"]
155

166
[tool.poetry.dependencies]
17-
python = "*"
18-
pendulum = {"version" = "^2.0.5", allows-prereleases = true}
197
invalid = "1.0"
20-
invalid_source = { "version" = "*", source = "not-exists" }
21-
invalid_source_multi = [
22-
{ "version" = "*", platform = "linux", source = "exists" },
23-
{ "version" = "*", platform = "win32", source = "not-exists2" },
24-
]
25-
26-
[[tool.poetry.source]]
27-
name = "exists"
28-
priority = "explicit"

0 commit comments

Comments
 (0)