Created
January 18, 2020 12:23
-
-
Save ykshatroff/48675a4802f34c5ffbf2d7ba784f3c43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import tempfile | |
import pytest | |
@pytest.fixture() | |
def file_data(): | |
yield "2020-01-18T13:49:47,text" | |
@pytest.fixture() | |
def existing_file(): | |
with tempfile.NamedTemporaryFile("w") as tmp_file: | |
file_name = tmp_file.name | |
with open(file_name, 'w') as f: | |
f.write("Test, data") | |
yield file_name | |
os.remove(file_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment