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
c95a62b5
Unverified
Commit
c95a62b5
authored
Apr 27, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests
parent
253bb029
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
0 deletions
+62
-0
tests/console/commands/test_about.py
+18
-0
tests/console/commands/test_check.py
+14
-0
tests/console/conftest.py
+30
-0
No files found.
tests/console/commands/test_about.py
0 → 100644
View file @
c95a62b5
from
cleo.testers
import
CommandTester
def
test_about
(
app
):
command
=
app
.
find
(
'about'
)
tester
=
CommandTester
(
command
)
tester
.
execute
([(
'command'
,
command
.
get_name
())])
expected
=
"""
\
Poetry - Package Management for Python
Poetry is a dependency manager tracking local dependencies of your projects and libraries.
See https://github.com/sdispater/poetry for more information.
"""
assert
tester
.
get_display
()
==
expected
tests/console/commands/test_check.py
0 → 100644
View file @
c95a62b5
from
cleo.testers
import
CommandTester
def
test_about
(
app
):
command
=
app
.
find
(
'check'
)
tester
=
CommandTester
(
command
)
tester
.
execute
([(
'command'
,
command
.
get_name
())])
expected
=
"""
\
All set!
"""
assert
tester
.
get_display
()
==
expected
tests/console/conftest.py
0 → 100644
View file @
c95a62b5
import
pytest
from
poetry.console
import
Application
as
BaseApplication
from
poetry.utils._compat
import
Path
class
Application
(
BaseApplication
):
def
__init__
(
self
,
poetry_path
):
super
(
Application
,
self
)
.
__init__
()
self
.
_poetry_path
=
poetry_path
@property
def
poetry
(
self
):
from
poetry.poetry
import
Poetry
if
self
.
_poetry
is
not
None
:
return
self
.
_poetry
self
.
_poetry
=
Poetry
.
create
(
self
.
_poetry_path
)
return
self
.
_poetry
@pytest.fixture
def
app
():
return
Application
(
Path
(
__file__
)
.
parent
.
parent
/
'fixtures'
/
'sample_project'
)
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