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 295461f commit 55d083d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pybedlite/tests/test_pybedlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,14 @@ 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"
assert BedRecord(chrom="chr1", start=1, end=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
assert not BedRecord(chrom="chr1", start=1, end=2, strand=None).negative
assert not BedRecord(chrom="chr1", start=1, end=2, strand=BedStrand.Positive).negative
assert BedRecord(chrom="chr1", start=1, end=2, strand=BedStrand.Negative).negative

0 comments on commit 55d083d

Please sign in to comment.