@@ -134,7 +134,9 @@ def test_md_read_write_file_exceptions(self) -> None:
134134
135135 # Test serializing to a file with bad filename
136136 with self .assertRaises (exceptions .StorageError ):
137- md = Metadata .from_file (f"{ self .repo_dir } /metadata/root.json" )
137+ md = Metadata .from_file (
138+ os .path .join (self .repo_dir , "metadata" , "root.json" )
139+ )
138140 md .to_file ("" )
139141
140142 def test_compact_json (self ) -> None :
@@ -159,7 +161,9 @@ def test_read_write_read_compare(self) -> None:
159161
160162 def test_serialize_with_validate (self ) -> None :
161163 # Assert that by changing one required attribute validation will fail.
162- root = Metadata .from_file (f"{ self .repo_dir } /metadata/root.json" )
164+ root = Metadata .from_file (
165+ os .path .join (self .repo_dir , "metadata" , "root.json" )
166+ )
163167 root .signed .version = 0
164168 with self .assertRaises (SerializationError ):
165169 root .to_bytes (JSONSerializer (validate = True ))
@@ -233,7 +237,9 @@ def test_sign_verify(self) -> None:
233237 def test_sign_failures (self ) -> None :
234238 # Test throwing UnsignedMetadataError because of signing problems
235239 # related to bad information in the signer.
236- md = Metadata .from_file (f"{ self .repo_dir } /metadata/snapshot.json" )
240+ md = Metadata .from_file (
241+ os .path .join (self .repo_dir , "metadata" , "snapshot.json" )
242+ )
237243 key_dict = copy (self .keystore [Snapshot .type ])
238244 key_dict ["keytype" ] = "rsa"
239245 key_dict ["scheme" ] = "bad_scheme"
0 commit comments