Skip to content
Snippets Groups Projects
Commit 73f833e6 authored by ulif's avatar ulif
Browse files

Move another fixture to conftest.py.

parent 75562981
No related branches found
No related tags found
No related merge requests found
......@@ -13,3 +13,11 @@ def argv_handler(request):
sys.argv = _argv_stored
sys.stdin = _stdin_stored
request.addfinalizer(teardown)
@pytest.fixture(scope="function")
def wordlists_dir(request, monkeypatch, tmpdir):
"""This fixture provides a temporary wordlist dir.
"""
monkeypatch.setattr("diceware.wordlist.WORDLISTS_DIR", str(tmpdir))
return tmpdir
......@@ -8,14 +8,6 @@ from diceware.wordlist import (
)
@pytest.fixture(scope="function")
def wordlists_dir(request, monkeypatch, tmpdir):
"""This fixture provides a temporary wordlist dir.
"""
monkeypatch.setattr("diceware.wordlist.WORDLISTS_DIR", str(tmpdir))
return tmpdir
@pytest.fixture(scope="function")
def wordlist(request, tmpdir):
"""A fixture that delivers a simple WordList instance.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment