From 759fb14461d20027ec1e7ebf4284867bd1a71c10 Mon Sep 17 00:00:00 2001 From: Jarrett Johnson Date: Mon, 10 Jun 2024 20:21:33 -0400 Subject: [PATCH] use setup conftest --- testing/testing.py | 1 - testing/tests/api/conftest.py | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 testing/tests/api/conftest.py diff --git a/testing/testing.py b/testing/testing.py index 552bc7988..eea78ba5c 100644 --- a/testing/testing.py +++ b/testing/testing.py @@ -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: diff --git a/testing/tests/api/conftest.py b/testing/tests/api/conftest.py new file mode 100644 index 000000000..d4ba7f618 --- /dev/null +++ b/testing/tests/api/conftest.py @@ -0,0 +1,9 @@ +import pytest + +from pymol import cmd + + +@pytest.fixture(autouse=True) +def setup(): + cmd.reinitialize() + yield