Skip to content

Commit

Permalink
Merge pull request #86 from Ensembl/jalvarez/update
Browse files Browse the repository at this point in the history
Use the UnitTestDB metadata feature to ease the core model loading
  • Loading branch information
JAlvarezJarreta authored Sep 24, 2024
2 parents 603b4a6 + 7340c12 commit 53ed8f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ build = [
cicd = [
"black",
"coverage",
"ensembl-utils >= 0.4.4",
"ensembl-utils >= 0.5.0",
"genbadge[coverage]",
"mypy",
"pylint",
Expand Down
3 changes: 1 addition & 2 deletions src/python/tests/core/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from ensembl.utils.database import UnitTestDB


@pytest.mark.parametrize("test_dbs", [[{"src": "core_db"}]], indirect=True)
@pytest.mark.parametrize("test_dbs", [[{"src": "core_db", "metadata": Base.metadata}]], indirect=True)
class TestCoreModels:
"""Tests the `~ensembl.core.models` ORMs"""

Expand All @@ -37,5 +37,4 @@ def setup(self, test_dbs: dict[str, UnitTestDB]) -> None:

def test_create_db(self) -> None:
"""Test the creation of a database with the core models schema."""
self.dbc.create_all_tables(Base.metadata)
assert set(self.dbc.tables.keys()) == set(Base.metadata.tables.keys())

0 comments on commit 53ed8f2

Please sign in to comment.