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
6596ba26
Unverified
Commit
6596ba26
authored
Jun 25, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests on Windows
parent
e5638dff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
15 deletions
+26
-15
tests/masonry/builders/test_complete.py
+10
-4
tests/masonry/builders/test_sdist.py
+12
-10
tests/test_poetry.py
+4
-1
No files found.
tests/masonry/builders/test_complete.py
View file @
6596ba26
...
...
@@ -55,7 +55,7 @@ def test_wheel_c_extension():
has_compiled_extension
=
False
for
name
in
zip
.
namelist
():
if
name
.
startswith
(
"extended/extended"
)
and
name
.
endswith
(
".so"
):
if
name
.
startswith
(
"extended/extended"
)
and
name
.
endswith
(
(
".so"
,
".pyd"
)
):
has_compiled_extension
=
True
assert
has_compiled_extension
...
...
@@ -172,7 +172,10 @@ def test_module_src():
zip
=
zipfile
.
ZipFile
(
str
(
whl
))
assert
"module_src.py"
in
zip
.
namelist
()
try
:
assert
"module_src.py"
in
zip
.
namelist
()
finally
:
zip
.
close
()
def
test_package_src
():
...
...
@@ -194,5 +197,8 @@ def test_package_src():
zip
=
zipfile
.
ZipFile
(
str
(
whl
))
assert
"package_src/__init__.py"
in
zip
.
namelist
()
assert
"package_src/module.py"
in
zip
.
namelist
()
try
:
assert
"package_src/__init__.py"
in
zip
.
namelist
()
assert
"package_src/module.py"
in
zip
.
namelist
()
finally
:
zip
.
close
()
tests/masonry/builders/test_sdist.py
View file @
6596ba26
...
...
@@ -183,16 +183,18 @@ def test_find_files_to_add():
builder
=
SdistBuilder
(
poetry
,
NullVenv
(),
NullIO
())
result
=
builder
.
find_files_to_add
()
assert
result
==
[
Path
(
"LICENSE"
),
Path
(
"README.rst"
),
Path
(
"my_package/__init__.py"
),
Path
(
"my_package/data1/test.json"
),
Path
(
"my_package/sub_pkg1/__init__.py"
),
Path
(
"my_package/sub_pkg2/__init__.py"
),
Path
(
"my_package/sub_pkg2/data2/data.json"
),
Path
(
"pyproject.toml"
),
]
assert
sorted
(
result
)
==
sorted
(
[
Path
(
"LICENSE"
),
Path
(
"README.rst"
),
Path
(
"my_package/__init__.py"
),
Path
(
"my_package/data1/test.json"
),
Path
(
"my_package/sub_pkg1/__init__.py"
),
Path
(
"my_package/sub_pkg2/__init__.py"
),
Path
(
"my_package/sub_pkg2/data2/data.json"
),
Path
(
"pyproject.toml"
),
]
)
def
test_find_packages
():
...
...
tests/test_poetry.py
View file @
6596ba26
...
...
@@ -21,7 +21,10 @@ def test_poetry():
assert
package
.
description
==
"Some description."
assert
package
.
authors
==
[
"Sébastien Eustace <sebastien@eustace.io>"
]
assert
package
.
license
.
id
==
"MIT"
assert
str
(
package
.
readme
.
relative_to
(
fixtures_dir
))
==
"sample_project/README.rst"
assert
(
package
.
readme
.
relative_to
(
fixtures_dir
)
.
as_posix
()
==
"sample_project/README.rst"
)
assert
package
.
homepage
==
"https://poetry.eustace.io"
assert
package
.
repository_url
==
"https://github.com/sdispater/poetry"
assert
package
.
keywords
==
[
"packaging"
,
"dependency"
,
"poetry"
]
...
...
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