Skip to content

Commit

Permalink
fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
BjornFJohansson committed Nov 12, 2024
1 parent fd5f16b commit 2074c27
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions tests/test_module_dseq.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ def test_initialization():

obj2 = Dseq("gata")

assert obj2.circular == False
assert obj2.circular is False

l = Dseq("gt")
c = l.looped()
ln = Dseq("gt")
c = ln.looped()

assert not l.circular
assert not ln.circular
assert c.circular

assert Dseq("gt", circular=False) == l
assert Dseq("gt", circular=False) == ln
assert Dseq("gt", circular=True) == c

assert Dseq.from_string("A") == Dseq("A")
Expand Down Expand Up @@ -154,6 +154,9 @@ def test_initialization():
)
assert obj3.ovhg == 1

assert Dseq.from_dsiupac("PEXIaaaQFZJ") == Dseq("GATCaaa", "CTAGttt", -4)
assert Dseq.from_dsiupac("QFZJaaaPEXI") == Dseq("aaaGATC", "tttCTAG", 4)


def test_cut_around_and_religate():
from pydna.dseq import Dseq
Expand Down Expand Up @@ -218,7 +221,7 @@ def test_Dseq_cutting_adding():
ovhg=0,
)

f, d, l = c.cut((EcoRI, PstI))
f, d, l_ = c.cut((EcoRI, PstI))

assert d.watson == "GtcatctactatcatcgtagcgtactgatctattctgctgctcatcatcggtactctctataattatatatatatgcgcgtG"
assert d.crick == "AATTCacgcgcatatatatataattatagagagtaccgatgatgagcagcagaatagatcagtacgctacgatgatagtagatgaCTGCA"
Expand Down Expand Up @@ -554,11 +557,12 @@ def test_dseq():

def test_Dseq_slicing():
from pydna.dseq import Dseq
from pydna.readers import read
from pydna.utils import eq

from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord as Srec
# from pydna.readers import read
# from pydna.utils import eq

# from Bio.Seq import Seq
# from Bio.SeqRecord import SeqRecord as Srec
from Bio.Restriction import BamHI

a = Dseq("ggatcc", "ggatcc", 0)
Expand Down Expand Up @@ -947,7 +951,7 @@ def test_apply_cut():
def test_cutsite_is_valid():

from pydna.dseq import Dseq
from Bio.Restriction import EcoRI, BsaI, PacI, NmeDI, Acc65I, NotI, BamHI, EcoRV
from Bio.Restriction import EcoRI, PacI, NmeDI, EcoRV

# Works for circular case
seqs = ["GAATTC", "TTAATTAAC", "GATATC"]
Expand Down

0 comments on commit 2074c27

Please sign in to comment.