44import tempfile
55import time
66from contextlib import contextmanager
7- from pathlib import Path , PurePosixPath
7+ from pathlib import Path
88from typing import Any , Dict , Generator , List , Optional , Tuple , Union
99from urllib .parse import urljoin
1010
@@ -94,7 +94,7 @@ def with_command(self, cmd: Optional[str] = None) -> "WireMockContainer":
9494 def copy_file_to_container (self , host_path : Path , container_path : Path ) -> None :
9595 with open (host_path , "rb" ) as fp :
9696 self .get_wrapped_container ().put_archive (
97- path = container_path , data = fp .read ()
97+ path = container_path . as_posix () , data = fp .read ()
9898 )
9999
100100 def copy_files_to_container (
@@ -131,7 +131,7 @@ def copy_mappings_to_container(self) -> None:
131131 """
132132
133133 self .copy_files_to_container (
134- configs = self .mapping_stubs , container_dir_path = PurePosixPath (f"{ self .MAPPINGS_DIR } " )
134+ configs = self .mapping_stubs , container_dir_path = Path (f"{ self .MAPPINGS_DIR } " )
135135 )
136136
137137 def copy_mapping_files_to_container (self ) -> None :
@@ -140,7 +140,7 @@ def copy_mapping_files_to_container(self) -> None:
140140 the configured FILES_DIR
141141 """
142142 self .copy_files_to_container (
143- configs = self .mapping_files , container_dir_path = PurePosixPath (f"{ self .FILES_DIR } " )
143+ configs = self .mapping_files , container_dir_path = Path (f"{ self .FILES_DIR } " )
144144 )
145145
146146 def server_running (self , retry_count : int = 3 , retry_delay : int = 1 ) -> bool :
0 commit comments