Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
44c60c4c
Unverified
Commit
44c60c4c
authored
Feb 21, 2020
by
László Velinszky
Committed by
GitHub
Feb 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed schema to support url in multi dependencies (#2035)
parent
04a15441
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
poetry/json/schemas/poetry-schema.json
+3
-0
tests/json/test_poetry_schema.py
+23
-0
No files found.
poetry/json/schemas/poetry-schema.json
View file @
44c60c4c
...
@@ -460,6 +460,9 @@
...
@@ -460,6 +460,9 @@
},
},
{
{
"$ref"
:
"#/definitions/path-dependency"
"$ref"
:
"#/definitions/path-dependency"
},
{
"$ref"
:
"#/definitions/url-dependency"
}
}
]
]
}
}
...
...
tests/json/test_poetry_schema.py
View file @
44c60c4c
...
@@ -14,8 +14,31 @@ def base_object():
...
@@ -14,8 +14,31 @@ def base_object():
}
}
@pytest.fixture
def
multi_url_object
():
return
{
"name"
:
"myapp"
,
"version"
:
"1.0.0"
,
"description"
:
"Some description."
,
"dependencies"
:
{
"python"
:
[
{
"url"
:
"https://download.pytorch.org/whl/cpu/torch-1.4.0
%2
Bcpu-cp37-cp37m-linux_x86_64.whl"
,
"platform"
:
"linux"
,
},
{
"path"
:
"../foo"
,
"platform"
:
"darwin"
},
]
},
"dev-dependencies"
:
{},
}
def
test_path_dependencies
(
base_object
):
def
test_path_dependencies
(
base_object
):
base_object
[
"dependencies"
]
.
update
({
"foo"
:
{
"path"
:
"../foo"
}})
base_object
[
"dependencies"
]
.
update
({
"foo"
:
{
"path"
:
"../foo"
}})
base_object
[
"dev-dependencies"
]
.
update
({
"foo"
:
{
"path"
:
"../foo"
}})
base_object
[
"dev-dependencies"
]
.
update
({
"foo"
:
{
"path"
:
"../foo"
}})
assert
len
(
validate_object
(
base_object
,
"poetry-schema"
))
==
0
assert
len
(
validate_object
(
base_object
,
"poetry-schema"
))
==
0
def
test_multi_url_dependencies
(
multi_url_object
):
assert
len
(
validate_object
(
multi_url_object
,
"poetry-schema"
))
==
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment