Skip to content

Commit

Permalink
repair
Browse files Browse the repository at this point in the history
some minus bugs in test nodes
  • Loading branch information
HaolingZHANG committed Sep 10, 2021
1 parent 7956699 commit 7821da4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion methods/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def remove(self, verified_bit_segments):
if verified_bit_segment is not None:
output = self.remove_one(verified_bit_segment)
data, data_type = output.get("data"), output.get("type")
if data_type and len(data) >= self.segment_length:
if data_type:
if self.segment_length is not None:
bit_segments.append(data[len(data) - self.segment_length:])
else:
Expand Down
1 change: 1 addition & 0 deletions test/test_trans_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def test_list_to_sequence(self):
])

def test_sequence_to_list(self):
self.tool.bit_size = 640
bit_segments = self.tool.carbon_to_silicon([
['G', 'C', 'C', 'G', 'C', 'A', 'A', 'C', 'G', 'G', 'C', 'G', 'G', 'T', 'C', 'T', 'A', 'C', 'A', 'T',
'A', 'T', 'T', 'G', 'A', 'T', 'T', 'T', 'A', 'C', 'G', 'C', 'T', 'T', 'T', 'T', 'G', 'C', 'G', 'A',
Expand Down
1 change: 1 addition & 0 deletions test/test_trans_blawat.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def test_list_to_sequence(self):
])

def test_sequence_to_list(self):
self.tool.bit_size = 640
bit_segments = self.tool.carbon_to_silicon([
['G', 'C', 'A', 'C', 'G', 'C', 'A', 'A', 'A', 'C', 'G', 'G', 'A', 'C', 'G', 'G', 'T', 'A', 'C', 'T', 'A',
'C', 'A', 'A', 'T', 'A', 'T', 'A', 'T', 'G', 'A', 'T', 'C', 'T', 'A', 'A', 'C', 'A', 'G', 'C', 'T', 'T',
Expand Down
1 change: 1 addition & 0 deletions test/test_trans_church.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def test_list_to_sequence(self):
])

def test_sequence_to_list(self):
self.tool.bit_size = 640
bit_segments = self.tool.carbon_to_silicon([
['T', 'C', 'C', 'T', 'C', 'G', 'G', 'A', 'A', 'T', 'A', 'A', 'A', 'C', 'C', 'T', 'G', 'C', 'T', 'A', 'C',
'G', 'T', 'A', 'T', 'C', 'G', 'T', 'C', 'T', 'G', 'G', 'C', 'C', 'C', 'G', 'C', 'C', 'G', 'T', 'C', 'A',
Expand Down
2 changes: 1 addition & 1 deletion test/test_trans_dna_fountain.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import random
import unittest

from Chamaeleo.methods.flowed import DNAFountain


Expand Down Expand Up @@ -108,6 +107,7 @@ def test_list_to_sequence(self):
])

def test_sequence_to_list(self):
self.tool.bit_size = 640
self.tool.decode_packets = 10
bit_segments = self.tool.carbon_to_silicon([
['A', 'G', 'G', 'A', 'A', 'G', 'G', 'G', 'A', 'A', 'A', 'G', 'A', 'A', 'A', 'A', 'T', 'A', 'T', 'A', 'A',
Expand Down
2 changes: 1 addition & 1 deletion test/test_trans_goldman.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import random
import unittest

from Chamaeleo.methods.fixed import Goldman


Expand Down Expand Up @@ -38,6 +37,7 @@ def test_list_to_sequence(self):
])

def test_sequence_to_list(self):
self.tool.bit_size = 640
bit_segments = self.tool.carbon_to_silicon([
['T', 'C', 'G', 'T', 'G', 'T', 'G', 'T', 'G', 'C', 'A', 'G', 'T', 'C', 'T', 'A', 'T', 'G', 'C', 'A', 'G',
'A', 'G', 'A', 'G', 'C', 'A', 'T', 'C', 'A', 'C', 'A', 'G', 'T', 'C', 'G', 'A', 'T', 'C', 'A', 'G', 'C',
Expand Down
1 change: 1 addition & 0 deletions test/test_trans_grass.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def test_list_to_sequence(self):
])

def test_sequence_to_list(self):
self.tool.bit_size = 640
bit_segments = self.tool.carbon_to_silicon([
['C', 'C', 'T', 'C', 'G', 'C', 'C', 'G', 'C', 'C', 'G', 'C', 'C', 'C', 'A', 'A', 'C', 'A', 'A', 'A', 'T',
'A', 'T', 'C', 'T', 'A', 'T', 'A', 'G', 'C', 'C', 'A', 'T', 'G', 'G', 'T', 'G', 'C', 'T', 'G', 'C', 'T',
Expand Down
1 change: 1 addition & 0 deletions test/test_trans_yin_yang_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def test_list_to_sequence(self):
])

def test_sequence_to_list(self):
self.tool.bit_size = 400
bit_segments = self.tool.carbon_to_silicon([
['G', 'T', 'C', 'G', 'G', 'C', 'A', 'G', 'T', 'C', 'C', 'A', 'T', 'A', 'C', 'C', 'A', 'A', 'G', 'A', 'A',
'T', 'C', 'T', 'A', 'G', 'G', 'G', 'A', 'A', 'C', 'G', 'T', 'G', 'A', 'T', 'T', 'C', 'G', 'T', 'G', 'A',
Expand Down

0 comments on commit 7821da4

Please sign in to comment.