Skip to content

Commit 05fb237

Browse files
authored
subtitle fixture
1 parent 5365d7d commit 05fb237

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,14 @@ def photoalbum(photos):
231231
return photos.get('Cats')
232232
except:
233233
return photos.get('photo_album1')
234+
235+
@pytest.fixture()
236+
def subtitle():
237+
mopen = mock_open()
238+
with patch('__main__.open', mopen):
239+
with open('subtitle.srt', 'w') as handler:
240+
handler.write('test')
241+
return handler
234242

235243

236244
@pytest.fixture()

0 commit comments

Comments
 (0)