Commit bbab4e66 by Sébastien Eustace

Fix tests for Windows

parent cb79ffb3
......@@ -54,7 +54,7 @@ class Builder(object):
explicitely_excluded = set()
for excluded_glob in self._package.exclude:
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
result = set()
......@@ -68,7 +68,7 @@ class Builder(object):
def is_excluded(self, filepath): # type: (Union[str, Path]) -> bool
if not isinstance(filepath, basestring):
filepath = str(filepath)
filepath = filepath.as_posix()
return filepath in self.find_excluded_files()
......
......@@ -438,7 +438,7 @@ def test_default_with_excluded_data(mocker):
# Patch git module to return specific excluded files
p = mocker.patch("poetry.vcs.git.Git.get_ignored_files")
p.return_value = [
str(
(
(
Path(__file__).parent
/ "fixtures"
......@@ -447,7 +447,9 @@ def test_default_with_excluded_data(mocker):
/ "data"
/ "sub_data"
/ "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"))
......
......@@ -1295,14 +1295,14 @@ def test_solver_can_resolve_directory_dependencies(solver, repo, package):
pendulum = get_package("pendulum", "2.0.3")
repo.add_package(pendulum)
path = str(
path = s(
Path(__file__).parent.parent
/ "fixtures"
/ "git"
/ "github.com"
/ "demo"
/ "demo"
)
).as_posix()
package.add_dependency("demo", {"path": path})
......@@ -1330,14 +1330,14 @@ def test_solver_can_resolve_directory_dependencies_with_extras(solver, repo, pac
repo.add_package(pendulum)
repo.add_package(cleo)
path = str(
path = (
Path(__file__).parent.parent
/ "fixtures"
/ "git"
/ "github.com"
/ "demo"
/ "demo"
)
).as_posix()
package.add_dependency("demo", {"path": path, "extras": ["foo"]})
......@@ -1364,12 +1364,12 @@ def test_solver_can_resolve_sdist_dependencies(solver, repo, package):
pendulum = get_package("pendulum", "2.0.3")
repo.add_package(pendulum)
path = str(
path = (
Path(__file__).parent.parent
/ "fixtures"
/ "distributions"
/ "demo-0.1.0.tar.gz"
)
).as_posix()
package.add_dependency("demo", {"path": path})
......@@ -1397,12 +1397,12 @@ def test_solver_can_resolve_sdist_dependencies_with_extras(solver, repo, package
repo.add_package(pendulum)
repo.add_package(cleo)
path = str(
path = (
Path(__file__).parent.parent
/ "fixtures"
/ "distributions"
/ "demo-0.1.0.tar.gz"
)
).as_posix()
package.add_dependency("demo", {"path": path, "extras": ["foo"]})
......@@ -1429,12 +1429,12 @@ def test_solver_can_resolve_wheel_dependencies(solver, repo, package):
pendulum = get_package("pendulum", "2.0.3")
repo.add_package(pendulum)
path = str(
path = (
Path(__file__).parent.parent
/ "fixtures"
/ "distributions"
/ "demo-0.1.0-py2.py3-none-any.whl"
)
).as_posix()
package.add_dependency("demo", {"path": path})
......@@ -1462,12 +1462,12 @@ def test_solver_can_resolve_wheel_dependencies_with_extras(solver, repo, package
repo.add_package(pendulum)
repo.add_package(cleo)
path = str(
path = (
Path(__file__).parent.parent
/ "fixtures"
/ "distributions"
/ "demo-0.1.0-py2.py3-none-any.whl"
)
).as_posix()
package.add_dependency("demo", {"path": path, "extras": ["foo"]})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment