Skip to content

Commit

Permalink
TST: test conversion of end column name to stop column name
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcar17 committed Mar 13, 2024
1 parent 03bc562 commit ace7a30
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Binary file added tests/data/old_col.gbkdb
Binary file not shown.
Binary file added tests/data/old_col.gffdb
Binary file not shown.
26 changes: 26 additions & 0 deletions tests/test_core/test_annotation_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,32 @@ def test_load_anns_with_write(DATA_DIR, tmp_dir):
assert got_data["tables"] == expect_data["tables"]


def test_gff_end_renamed_to_stop(DATA_DIR, gff_db):
inpath = DATA_DIR / "old_col.gffdb"
old_db = GffAnnotationDb(source=inpath)

old_rich_dict = old_db.to_rich_dict()
new_rich_dict = gff_db.to_rich_dict()

del old_rich_dict["init_args"]
del new_rich_dict["init_args"]

assert old_rich_dict == new_rich_dict


def test_gff_end_renamed_to_stop(DATA_DIR, gb_db):
inpath = DATA_DIR / "old_col.gbkdb"
old_db = GenbankAnnotationDb(source=inpath)

old_rich_dict = old_db.to_rich_dict()
new_rich_dict = gb_db.to_rich_dict()

del old_rich_dict["init_args"]
del new_rich_dict["init_args"]

assert old_rich_dict != new_rich_dict


def test_gbdb_get_children_fails_no_coords(gb_db):
with pytest.raises(ValueError):
_ = list(gb_db.get_feature_children(name="CNA00110"))
Expand Down

0 comments on commit ace7a30

Please sign in to comment.