Skip to content

Commit

Permalink
add test for cli
Browse files Browse the repository at this point in the history
  • Loading branch information
daler committed Apr 9, 2024
1 parent 175f421 commit d7b9aa0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions gffutils/test/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import subprocess as sp
import gffutils
from gffutils import example_filename, create, feature


def test_issue_224():
fn = gffutils.example_filename("FBgn0031208.gtf")
sp.run(["gffutils-cli", "create", "--force", fn])
p = sp.run(
["gffutils-cli", "children", fn + ".db", "FBgn0031208"],
check=True,
capture_output=True,
universal_newlines=True,
)
assert (
p.stdout.splitlines()[0]
== 'chr2L\tgffutils_derived\tgene\t7529\t9484\t.\t+\t.\tgene_id "FBgn0031208";'
)

0 comments on commit d7b9aa0

Please sign in to comment.