File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -99,12 +99,14 @@ def path(self, local_testdir):
9999 self .path = UPath (path )
100100
101101
102- def test_create_from_type (local_testdir ):
103- paths = [local_testdir , "s3://bucket/folder" , "gs://bucket/folder" ]
104- for path in paths :
105- parts = path .split ("/" )
106- parent = "/" .join (parts [:- 1 ])
107- upath = UPath (path )
108- cast = type (upath )
109- new = cast (parent )
110- assert isinstance (new , cast )
102+ PATHS = ["/tmp/abc" , "s3://bucket/folder" , "gs://bucket/folder" ]
103+
104+
105+ @pytest .mark .parametrize ("path" , PATHS )
106+ def test_create_from_type (path ):
107+ parts = path .split ("/" )
108+ parent = "/" .join (parts [:- 1 ])
109+ upath = UPath (path )
110+ cast = type (upath )
111+ new = cast (parent )
112+ assert isinstance (new , cast )
You can’t perform that action at this time.
0 commit comments