Skip to content

Commit f17634b

Browse files
Merge pull request #47 from JAlvarezJarreta/jalvarez/rm_tmp_dir
Remove tmp_dir fixture as pytest offers tmp_path since v6.2
2 parents 29dbe7b + 7503da8 commit f17634b

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
name = "ensembl-py"
1717
description = "Ensembl Python Base Library"
1818
requires-python = ">= 3.8"
19-
version = "1.2.4"
19+
version = "1.3.0"
2020
readme = "README.md"
2121
authors = [
2222
{name = "Ensembl", email = "[email protected]"},

src/python/ensembl/plugins/pytest_unittest.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,3 @@ def test_method(..., multi_dbs: Dict[str, UnitTestDB], ...):
158158
key = name if name else src.name
159159
databases[key] = db_factory(src, name)
160160
return databases
161-
162-
163-
@pytest.fixture(scope='session')
164-
def tmp_dir(request: FixtureRequest, tmp_path_factory: TempPathFactory) -> Generator:
165-
"""Yields a :class:`Path` object pointing to a newly created temporary directory.
166-
167-
Args:
168-
request: Access to the requesting test context.
169-
tmp_path_factory: Session-scoped fixture that creates arbitrary temporary directories.
170-
171-
"""
172-
tmpdir = tmp_path_factory.mktemp(f"test_{request.node.name}")
173-
yield tmpdir
174-
# Delete the temporary directory unless the user has requested to keep it
175-
if not request.config.getoption("keep_data"):
176-
shutil.rmtree(tmpdir)

0 commit comments

Comments
 (0)