Skip to content

Commit 0e57edd

Browse files
committed
Test case where parts assemble into an enzyme site
1 parent 1e05fbb commit 0e57edd

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
LOCUS fragment_1 62 bp DNA linear UNK 01-JAN-1980
2+
DEFINITION .
3+
ACCESSION fragment_1
4+
VERSION fragment_1
5+
KEYWORDS .
6+
SOURCE
7+
ORGANISM .
8+
.
9+
FEATURES Location/Qualifiers
10+
ORIGIN
11+
1 cgtctcacta actaagcagc ccggctttcg ccctattgag tctaccgcgg cgtcttgaga
12+
61 cg
13+
//
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
LOCUS fragment_2 80 bp DNA linear UNK 01-JAN-1980
2+
DEFINITION .
3+
ACCESSION fragment_2
4+
VERSION fragment_2
5+
KEYWORDS .
6+
SOURCE
7+
ORGANISM .
8+
.
9+
FEATURES Location/Qualifiers
10+
ORIGIN
11+
1 cgtctcagtc tcaaatcaat agatgtactg tagaatcctg atagaaaagg cagaagcccg
12+
61 gtaatcgcgc taatgagacg
13+
//

tests/test_type2S_assembly.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# )
2323
# simulation = assembly.simulate(sequence_repository=repo)
2424
# assert len(simulation.construct_records) == 1
25-
# # We expect two errors:
25+
# # We expect two errors:
2626
# assert len(simulation.errors) == 2
2727

2828
# assembly = dc.Type2sRestrictionAssembly(
@@ -48,3 +48,14 @@ def test_single_assembly_with_wrong_enzyme(tmpdir):
4848
# )
4949
# simulation = assembly.simulate(sequence_repository=repo)
5050
# assert len(simulation.construct_records) == 4
51+
52+
53+
def test_assembling_into_new_enzyme_site():
54+
assembly = dc.Type2sRestrictionAssembly(
55+
parts=["fragment_1", "fragment_2"], enzyme="BsmBI"
56+
)
57+
simulation = assembly.simulate(sequence_repository=repo)
58+
assert len(simulation.construct_records) == 1
59+
assert len(simulation.errors) == 1
60+
assert simulation.errors[0].message == "Assembly creates a new enzyme site"
61+

0 commit comments

Comments
 (0)