File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -340,14 +340,14 @@ def parent(self) -> PathLike:
340340 def relative_to (self , other_pathlike : PathLike ) -> PurePath :
341341 if not isinstance (other_pathlike , BucketPath ):
342342 raise BucketFsError (
343- ' BucketPath.relative_to() called with other'
344- f' being an instance of { type (other_pathlike )} .'
343+ " BucketPath.relative_to() called with other"
344+ f" being an instance of { type (other_pathlike )} ."
345345 )
346346 other = cast (BucketPath , other_pathlike )
347347 if self ._bucket_api != other .bucket_api :
348348 raise BucketFsError (
349- ' BucketPath.relative_to() called with other'
350- f' from a foreign bucket { other ._bucket_api } .'
349+ " BucketPath.relative_to() called with other"
350+ f" from a foreign bucket { other ._bucket_api } ."
351351 )
352352 try :
353353 return self ._path .relative_to (other ._path )
Original file line number Diff line number Diff line change 33 Path ,
44 PurePath ,
55)
6+
67import pytest
78
89import exasol .bucketfs as bfs
@@ -253,8 +254,7 @@ def test_relative_outside(bucket_fake):
253254 a = bfs .path .BucketPath ("a" , bucket_api = bucket_fake )
254255 b = bfs .path .BucketPath ("b" , bucket_api = bucket_fake )
255256 with pytest .raises (
256- bfs .path .BucketFsError ,
257- match = "'b' is not in the subpath of 'a'"
257+ bfs .path .BucketFsError , match = "'b' is not in the subpath of 'a'"
258258 ):
259259 b .relative_to (a )
260260
@@ -267,10 +267,13 @@ def test_foreign_bucket(tmp_path, bucket_fake):
267267 testee .relative_to (foreign )
268268
269269
270- @pytest .mark .parametrize ("path, expected_relative" , [
271- ("a" , "a" ),
272- ("a/b" , "a/b" ),
273- ])
270+ @pytest .mark .parametrize (
271+ "path, expected_relative" ,
272+ [
273+ ("a" , "a" ),
274+ ("a/b" , "a/b" ),
275+ ],
276+ )
274277def test_relative_to (path , expected_relative , bucket_fake ):
275278 root = bfs .path .BucketPath ("root" , bucket_api = bucket_fake )
276279 testee = root / path
You can’t perform that action at this time.
0 commit comments