Skip to content

Commit

Permalink
chore: add unit tests for new properties
Browse files Browse the repository at this point in the history
  • Loading branch information
clintval committed Aug 2, 2024
1 parent 34a63a6 commit 295461f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pybedlite/tests/test_pybedlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,13 @@ def test_bedstrand_opposite() -> None:

assert BedStrand.Positive.opposite is BedStrand.Negative
assert BedStrand.Negative.opposite is BedStrand.Positive

def test_bedrecord_refname() -> None:
"""Test that the alternate property for reference sequence name is correct."""
assert BedRecord("chr1", 1, 2).refname == "chr1"

def test_bedrecord_negative() -> None:
"""Test that the negative property is set correctly."""
assert not BedRecord("chr1", 1, 2, strand=None).negative
assert not BedRecord("chr1", 1, 2, strand=BedStrand.Positive).negative
assert BedRecord("chr1", 1, 2, strand=BedStrand.Negative).negative

0 comments on commit 295461f

Please sign in to comment.