Skip to content

Commit

Permalink
add back cwd fixture using os.chdir instead
Browse files Browse the repository at this point in the history
  • Loading branch information
kennydo committed Feb 17, 2023
1 parent 8f53827 commit 3fb8480
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,22 @@
from __future__ import print_function
from __future__ import unicode_literals

import os

import pytest


@pytest.fixture(autouse=True)
def cwd():
old_dir = os.getcwd()
os.chdir('/')

try:
yield
finally:
os.chdir(old_dir)


@pytest.fixture
def venv_path(tmpdir):
return tmpdir.join('venv')
Expand Down

0 comments on commit 3fb8480

Please sign in to comment.