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
bbab4e66
Unverified
Commit
bbab4e66
authored
Nov 08, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests for Windows
parent
cb79ffb3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
poetry/masonry/builders/builder.py
+2
-2
tests/masonry/builders/test_sdist.py
+4
-2
tests/puzzle/test_solver.py
+12
-12
No files found.
poetry/masonry/builders/builder.py
View file @
bbab4e66
...
@@ -54,7 +54,7 @@ class Builder(object):
...
@@ -54,7 +54,7 @@ class Builder(object):
explicitely_excluded
=
set
()
explicitely_excluded
=
set
()
for
excluded_glob
in
self
.
_package
.
exclude
:
for
excluded_glob
in
self
.
_package
.
exclude
:
for
excluded
in
self
.
_path
.
glob
(
excluded_glob
):
for
excluded
in
self
.
_path
.
glob
(
excluded_glob
):
explicitely_excluded
.
add
(
str
(
excluded
.
relative_to
(
self
.
_path
)
))
explicitely_excluded
.
add
(
excluded
.
relative_to
(
self
.
_path
)
.
as_posix
(
))
ignored
=
vcs_ignored_files
|
explicitely_excluded
ignored
=
vcs_ignored_files
|
explicitely_excluded
result
=
set
()
result
=
set
()
...
@@ -68,7 +68,7 @@ class Builder(object):
...
@@ -68,7 +68,7 @@ class Builder(object):
def
is_excluded
(
self
,
filepath
):
# type: (Union[str, Path]) -> bool
def
is_excluded
(
self
,
filepath
):
# type: (Union[str, Path]) -> bool
if
not
isinstance
(
filepath
,
basestring
):
if
not
isinstance
(
filepath
,
basestring
):
filepath
=
str
(
filepath
)
filepath
=
filepath
.
as_posix
(
)
return
filepath
in
self
.
find_excluded_files
()
return
filepath
in
self
.
find_excluded_files
()
...
...
tests/masonry/builders/test_sdist.py
View file @
bbab4e66
...
@@ -438,7 +438,7 @@ def test_default_with_excluded_data(mocker):
...
@@ -438,7 +438,7 @@ def test_default_with_excluded_data(mocker):
# Patch git module to return specific excluded files
# Patch git module to return specific excluded files
p
=
mocker
.
patch
(
"poetry.vcs.git.Git.get_ignored_files"
)
p
=
mocker
.
patch
(
"poetry.vcs.git.Git.get_ignored_files"
)
p
.
return_value
=
[
p
.
return_value
=
[
str
(
(
(
(
Path
(
__file__
)
.
parent
Path
(
__file__
)
.
parent
/
"fixtures"
/
"fixtures"
...
@@ -447,7 +447,9 @@ def test_default_with_excluded_data(mocker):
...
@@ -447,7 +447,9 @@ def test_default_with_excluded_data(mocker):
/
"data"
/
"data"
/
"sub_data"
/
"sub_data"
/
"data2.txt"
/
"data2.txt"
)
.
relative_to
(
project
(
"default_with_excluded_data"
))
)
.
relative_to
(
project
(
"default_with_excluded_data"
))
.
as_posix
()
)
)
]
]
poetry
=
Poetry
.
create
(
project
(
"default_with_excluded_data"
))
poetry
=
Poetry
.
create
(
project
(
"default_with_excluded_data"
))
...
...
tests/puzzle/test_solver.py
View file @
bbab4e66
...
@@ -1295,14 +1295,14 @@ def test_solver_can_resolve_directory_dependencies(solver, repo, package):
...
@@ -1295,14 +1295,14 @@ def test_solver_can_resolve_directory_dependencies(solver, repo, package):
pendulum
=
get_package
(
"pendulum"
,
"2.0.3"
)
pendulum
=
get_package
(
"pendulum"
,
"2.0.3"
)
repo
.
add_package
(
pendulum
)
repo
.
add_package
(
pendulum
)
path
=
s
tr
(
path
=
s
(
Path
(
__file__
)
.
parent
.
parent
Path
(
__file__
)
.
parent
.
parent
/
"fixtures"
/
"fixtures"
/
"git"
/
"git"
/
"github.com"
/
"github.com"
/
"demo"
/
"demo"
/
"demo"
/
"demo"
)
)
.
as_posix
()
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
})
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
})
...
@@ -1330,14 +1330,14 @@ def test_solver_can_resolve_directory_dependencies_with_extras(solver, repo, pac
...
@@ -1330,14 +1330,14 @@ def test_solver_can_resolve_directory_dependencies_with_extras(solver, repo, pac
repo
.
add_package
(
pendulum
)
repo
.
add_package
(
pendulum
)
repo
.
add_package
(
cleo
)
repo
.
add_package
(
cleo
)
path
=
str
(
path
=
(
Path
(
__file__
)
.
parent
.
parent
Path
(
__file__
)
.
parent
.
parent
/
"fixtures"
/
"fixtures"
/
"git"
/
"git"
/
"github.com"
/
"github.com"
/
"demo"
/
"demo"
/
"demo"
/
"demo"
)
)
.
as_posix
()
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
,
"extras"
:
[
"foo"
]})
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
,
"extras"
:
[
"foo"
]})
...
@@ -1364,12 +1364,12 @@ def test_solver_can_resolve_sdist_dependencies(solver, repo, package):
...
@@ -1364,12 +1364,12 @@ def test_solver_can_resolve_sdist_dependencies(solver, repo, package):
pendulum
=
get_package
(
"pendulum"
,
"2.0.3"
)
pendulum
=
get_package
(
"pendulum"
,
"2.0.3"
)
repo
.
add_package
(
pendulum
)
repo
.
add_package
(
pendulum
)
path
=
str
(
path
=
(
Path
(
__file__
)
.
parent
.
parent
Path
(
__file__
)
.
parent
.
parent
/
"fixtures"
/
"fixtures"
/
"distributions"
/
"distributions"
/
"demo-0.1.0.tar.gz"
/
"demo-0.1.0.tar.gz"
)
)
.
as_posix
()
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
})
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
})
...
@@ -1397,12 +1397,12 @@ def test_solver_can_resolve_sdist_dependencies_with_extras(solver, repo, package
...
@@ -1397,12 +1397,12 @@ def test_solver_can_resolve_sdist_dependencies_with_extras(solver, repo, package
repo
.
add_package
(
pendulum
)
repo
.
add_package
(
pendulum
)
repo
.
add_package
(
cleo
)
repo
.
add_package
(
cleo
)
path
=
str
(
path
=
(
Path
(
__file__
)
.
parent
.
parent
Path
(
__file__
)
.
parent
.
parent
/
"fixtures"
/
"fixtures"
/
"distributions"
/
"distributions"
/
"demo-0.1.0.tar.gz"
/
"demo-0.1.0.tar.gz"
)
)
.
as_posix
()
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
,
"extras"
:
[
"foo"
]})
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
,
"extras"
:
[
"foo"
]})
...
@@ -1429,12 +1429,12 @@ def test_solver_can_resolve_wheel_dependencies(solver, repo, package):
...
@@ -1429,12 +1429,12 @@ def test_solver_can_resolve_wheel_dependencies(solver, repo, package):
pendulum
=
get_package
(
"pendulum"
,
"2.0.3"
)
pendulum
=
get_package
(
"pendulum"
,
"2.0.3"
)
repo
.
add_package
(
pendulum
)
repo
.
add_package
(
pendulum
)
path
=
str
(
path
=
(
Path
(
__file__
)
.
parent
.
parent
Path
(
__file__
)
.
parent
.
parent
/
"fixtures"
/
"fixtures"
/
"distributions"
/
"distributions"
/
"demo-0.1.0-py2.py3-none-any.whl"
/
"demo-0.1.0-py2.py3-none-any.whl"
)
)
.
as_posix
()
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
})
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
})
...
@@ -1462,12 +1462,12 @@ def test_solver_can_resolve_wheel_dependencies_with_extras(solver, repo, package
...
@@ -1462,12 +1462,12 @@ def test_solver_can_resolve_wheel_dependencies_with_extras(solver, repo, package
repo
.
add_package
(
pendulum
)
repo
.
add_package
(
pendulum
)
repo
.
add_package
(
cleo
)
repo
.
add_package
(
cleo
)
path
=
str
(
path
=
(
Path
(
__file__
)
.
parent
.
parent
Path
(
__file__
)
.
parent
.
parent
/
"fixtures"
/
"fixtures"
/
"distributions"
/
"distributions"
/
"demo-0.1.0-py2.py3-none-any.whl"
/
"demo-0.1.0-py2.py3-none-any.whl"
)
)
.
as_posix
()
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
,
"extras"
:
[
"foo"
]})
package
.
add_dependency
(
"demo"
,
{
"path"
:
path
,
"extras"
:
[
"foo"
]})
...
...
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