@@ -102,7 +102,8 @@ def test_file_bundle_manifest(self):
102
102
self .assertEqual (len (manifest [fname ]), count )
103
103
104
104
def test_round_trip (self ):
105
- tmp_path = tempfile .NamedTemporaryFile (suffix = ".otiod" ).name
105
+ with tempfile .NamedTemporaryFile (suffix = ".otiod" ) as bogusfile :
106
+ tmp_path = bogusfile .name
106
107
otio .adapters .write_to_file (self .tl , tmp_path )
107
108
self .assertTrue (os .path .exists (tmp_path ))
108
109
@@ -132,7 +133,8 @@ def test_round_trip(self):
132
133
self .assertJsonEqual (result , self .tl )
133
134
134
135
def test_round_trip_all_missing_references (self ):
135
- tmp_path = tempfile .NamedTemporaryFile (suffix = ".otiod" ).name
136
+ with tempfile .NamedTemporaryFile (suffix = ".otiod" ) as bogusfile :
137
+ tmp_path = bogusfile .name
136
138
otio .adapters .write_to_file (
137
139
self .tl ,
138
140
tmp_path ,
@@ -154,7 +156,8 @@ def test_round_trip_all_missing_references(self):
154
156
)
155
157
156
158
def test_round_trip_absolute_paths (self ):
157
- tmp_path = tempfile .NamedTemporaryFile (suffix = ".otiod" ).name
159
+ with tempfile .NamedTemporaryFile (suffix = ".otiod" ) as bogusfile :
160
+ tmp_path = bogusfile .name
158
161
otio .adapters .write_to_file (self .tl , tmp_path )
159
162
160
163
# ...but can be optionally told to generate absolute paths
0 commit comments