diff --git a/docker/utils/utils.py b/docker/utils/utils.py index f2f7c268..d89aecf3 100644 --- a/docker/utils/utils.py +++ b/docker/utils/utils.py @@ -209,8 +209,8 @@ def match_path(path, pattern): if pattern: pattern = os.path.relpath(pattern) - pattern_components = pattern.split('/') - path_components = path.split('/')[:len(pattern_components)] + pattern_components = pattern.split(os.path.sep) + path_components = path.split(os.path.sep)[:len(pattern_components)] return fnmatch('/'.join(path_components), pattern) diff --git a/tests/integration/container_test.py b/tests/integration/container_test.py index 5ced082d..838ec364 100644 --- a/tests/integration/container_test.py +++ b/tests/integration/container_test.py @@ -414,6 +414,9 @@ class VolumeBindTest(BaseIntegrationTest): ['touch', os.path.join(self.mount_dest, self.filename)], ) + @pytest.mark.xfail( + IS_WINDOWS_PLATFORM, reason='Test not designed for Windows platform' + ) def test_create_with_binds_rw(self): container = self.run_with_volume( @@ -429,6 +432,9 @@ class VolumeBindTest(BaseIntegrationTest): inspect_data = self.client.inspect_container(container) self.check_container_data(inspect_data, True) + @pytest.mark.xfail( + IS_WINDOWS_PLATFORM, reason='Test not designed for Windows platform' + ) def test_create_with_binds_ro(self): self.run_with_volume( False,