Skip to content

Commit

Permalink
pytest: support non-top level dirs
Browse files Browse the repository at this point in the history
Generalize `basepath` to support running from any directory.
  • Loading branch information
ax3l committed Oct 20, 2023
1 parent 198cbb3 commit f199454
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

import itertools
import os
from pathlib import Path

import pytest

Expand All @@ -21,7 +21,7 @@
from mpi4py import MPI # noqa

# base path for input files
basepath = os.getcwd()
basepath = Path(__file__).parent.parent


@pytest.fixture(autouse=True, scope="function")
Expand Down

0 comments on commit f199454

Please sign in to comment.