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
2d54ec97
Unverified
Commit
2d54ec97
authored
Jan 18, 2023
by
Martin Miglio
Committed by
GitHub
Jan 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
poetry check command accepts --directory argument (#7241)
parent
7714eda2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
src/poetry/console/commands/check.py
+1
-3
tests/console/commands/test_check.py
+10
-5
No files found.
src/poetry/console/commands/check.py
View file @
2d54ec97
from
__future__
import
annotations
from
pathlib
import
Path
from
poetry.console.commands.command
import
Command
...
...
@@ -61,7 +59,7 @@ class CheckCommand(Command):
from
poetry.factory
import
Factory
# Load poetry config and display errors, if any
poetry_file
=
Factory
.
locate
(
Path
.
cwd
())
poetry_file
=
self
.
poetry
.
file
.
path
config
=
PyProjectTOML
(
poetry_file
)
.
poetry_config
check_result
=
Factory
.
validate
(
config
,
strict
=
True
)
...
...
tests/console/commands/test_check.py
View file @
2d54ec97
...
...
@@ -29,12 +29,17 @@ All set!
def
test_check_invalid
(
mocker
:
MockerFixture
,
tester
:
CommandTester
):
from
poetry.core.toml
import
TOMLFile
mocker
.
patch
(
"poetry.factory.Factory.locate"
,
return_value
=
Path
(
__file__
)
.
parent
.
parent
.
parent
/
"fixtures"
/
"invalid_pyproject"
/
"pyproject.toml"
,
"poetry.poetry.Poetry.file"
,
return_value
=
TOMLFile
(
Path
(
__file__
)
.
parent
.
parent
.
parent
/
"fixtures"
/
"invalid_pyproject"
/
"pyproject.toml"
),
new_callable
=
mocker
.
PropertyMock
,
)
tester
.
execute
()
...
...
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