Skip to content

Commit

Permalink
Merge pull request #367 from eduzen/#359-pytest-II-tests-cache
Browse files Browse the repository at this point in the history
#359 pytest ii tests cache
  • Loading branch information
facundobatista authored May 28, 2019
2 parents 6c90aae + 9301f8b commit 295e5f4
Show file tree
Hide file tree
Showing 9 changed files with 681 additions and 710 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var/
*.egg-info/
.installed.cfg
*.egg
.mypy_cache/

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -59,3 +60,6 @@ target/
# archlinux
!pkg/archlinux/PKGBUILD
pkg/archlinux/*

# Ides
.vscode/
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import shutil

from pytest import fixture


@fixture(scope="function")
def tmp_file(tmpdir_factory):
""" Fixture for a unique tmpfile for each test."""
dir_path = tmpdir_factory.mktemp("test")
yield str(dir_path.join("testfile")) # Converted to str to support python <3.6 versions
shutil.rmtree(str(dir_path))
Loading

0 comments on commit 295e5f4

Please sign in to comment.