Skip to content

Commit

Permalink
use setup conftest
Browse files Browse the repository at this point in the history
  • Loading branch information
JarrettSJohnson committed Jun 11, 2024
1 parent e84712f commit 759fb14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion testing/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,6 @@ def run_testfiles(filenames='all', verbosity=2, out=sys.stderr, **kwargs):
resultclass=PyMOLTestResult, verbosity=int(verbosity)).run(suite)

# Run pytest files if any
cmd.reinitialize()
pytest_nfail = pytest.main(['-v', *map(str, pytest_files)]) if pytest_files else 0

while deferred_unlink:
Expand Down
9 changes: 9 additions & 0 deletions testing/tests/api/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import pytest

from pymol import cmd


@pytest.fixture(autouse=True)
def setup():
cmd.reinitialize()
yield

0 comments on commit 759fb14

Please sign in to comment.