Skip to content

Commit

Permalink
Update test to disable creation of empty Sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Jan 27, 2024
1 parent f974b88 commit abeb848
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion pyfamsa/_famsa.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ cdef class Sequence:
raise ValueError("Cannot create an empty sequence")
self._cseq = move(CSequence(id, sequence, 0, NULL))
self._shape[0] = self._cseq.length
# assert self._cseq.mma is not NULL

def __copy__(self):
return self.copy()
Expand Down
10 changes: 3 additions & 7 deletions pyfamsa/tests/test_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ def test_buffer_export(self):
b = mem.tobytes()
self.assertEqual(len(b), 4)

def test_buffer_export_empty(self):
seq = Sequence(b"", b"")
mem = memoryview(seq)
self.assertEqual(mem.shape[0], 0)
self.assertTrue(mem.readonly)
b = mem.tobytes()
self.assertEqual(len(b), 0)
def test_error_empty(self):
with self.assertRaises(ValueError):
seq = Sequence(b"", b"")

0 comments on commit abeb848

Please sign in to comment.