Skip to content

Commit

Permalink
added test generated by GitHub Copilot
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Dec 25, 2022
1 parent c55411e commit fca673a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/scadnano_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8105,3 +8105,33 @@ def test_no_base_pairs_only_forward_strand(self) -> None:

base_pairs = design.base_pairs(allow_mismatches=False)
self.assertEqual(len(base_pairs), 0)

def test_no_base_pairs_only_reverse_strand(self) -> None:
'''
0123456789
<--]
'''
design = sc.Design(helices=[sc.Helix(max_offset=100)])
design.draw_strand(0, 8).move(-4)

base_pairs = design.base_pairs(allow_mismatches=False)
self.assertEqual(len(base_pairs), 0)

def test_base_pairs_on_forward_strand_ahead_of_reverse_strand(self) -> None:
'''
0123456789
[---->
<----]
'''
design = sc.Design(helices=[sc.Helix(max_offset=100)])
design.draw_strand(0, 2).move(6)
design.draw_strand(0, 6).move(-6)

base_pairs = design.base_pairs(allow_mismatches=False)
self.assertEqual(len(base_pairs), 1)
self.assertEqual(len(base_pairs[0]), 4)

self.assertIn(2, base_pairs[0])
self.assertIn(3, base_pairs[0])
self.assertIn(4, base_pairs[0])
self.assertIn(5, base_pairs[0])

0 comments on commit fca673a

Please sign in to comment.