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
# https://pytest.org/latest/tmpdir.html | |
# http://py.readthedocs.org/en/latest/path.html | |
# Using in conftest.py | |
@pytest.fixture(autouse=True) | |
def a_tmp_filename(tmpdir): | |
p = tmpdir.join("filename") | |
p.write("some stuff\n") | |
return str(p) # str(p) returns the full pathname you can use with normal modules |