File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -259,3 +259,14 @@ def test_child_path(self):
259259 assert path_a ._drv == path_b ._drv
260260 assert path_a ._parts == path_b ._parts
261261 assert path_a ._url == path_b ._url
262+
263+ def test_copy_path (self ):
264+ path = self .path
265+ copy_path = UPath (path )
266+
267+ assert type (path ) == type (copy_path )
268+ assert str (path ) == str (copy_path )
269+ assert path ._drv == copy_path ._drv
270+ assert path ._root == copy_path ._root
271+ assert path ._parts == copy_path ._parts
272+ assert path .fs .storage_options == copy_path .fs .storage_options
Original file line number Diff line number Diff line change @@ -188,3 +188,14 @@ def test_copy_path():
188188 assert path ._root == copy_path ._root
189189 assert path ._parts == copy_path ._parts
190190 assert path .fs .storage_options == copy_path .fs .storage_options
191+
192+
193+ def test_copy_path_posix ():
194+ path = UPath ("/tmp/folder" , anon = True )
195+ copy_path = UPath (path )
196+
197+ assert type (path ) == type (copy_path )
198+ assert str (path ) == str (copy_path )
199+ assert path ._drv == copy_path ._drv
200+ assert path ._root == copy_path ._root
201+ assert path ._parts == copy_path ._parts
You can’t perform that action at this time.
0 commit comments