# Path: primer3/bindings.py
# PRIMER3_HOME = os.environ['PRIMER3HOME']
# _THERMO_ANALYSIS = thermoanalysis.ThermoAnalysis()
# def _setThermoArgs(mv_conc=50, dv_conc=0, dntp_conc=0.8, dna_conc=50,
#                    temp_c=37, max_loop=30, tm_method='santalucia',
#                    salt_corrections_method='santalucia', **kwargs):
# def calcHairpin(seq, mv_conc=50.0, dv_conc=0.0, dntp_conc=0.8, dna_conc=50.0,
#                 temp_c=37, max_loop=30, output_structure=False):
# def calcHomodimer(seq, mv_conc=50, dv_conc=0, dntp_conc=0.8, dna_conc=50,
#                   temp_c=37, max_loop=30, output_structure=False):
# def calcHeterodimer(seq1, seq2, mv_conc=50, dv_conc=0, dntp_conc=0.8,
#                     dna_conc=50, temp_c=37, max_loop=30,
#                     output_structure=False):
# def calcEndStability(seq1, seq2, mv_conc=50, dv_conc=0, dntp_conc=0.8,
#                      dna_conc=50, temp_c=37, max_loop=30):
# def calcTm(seq, mv_conc=50, dv_conc=0, dntp_conc=0.8, dna_conc=50,
#            max_nn_length=60, tm_method='santalucia',
#            salt_corrections_method='santalucia'):
# def designPrimers(seq_args, global_args=None, misprime_lib=None,
#                   mishyb_lib=None, debug=False):
# def setP3Globals(global_args, misprime_lib=None, mishyb_lib=None):
# def setP3SeqArgs(seq_args):
# def runP3Design(debug=False):
# 
# Path: primer3/wrappers.py
# LOCAL_DIR = os.path.dirname(os.path.realpath(__file__))
# PRIMER3_HOME = os.environ.get('PRIMER3HOME')
# THERMO_PATH = pjoin(PRIMER3_HOME, 'primer3_config/')
# DEV_NULL = open(os.devnull, 'wb')
# THERMORESULT = namedtuple('thermoresult', [
#         'result',           # True if a structure is present
#         'ds',               # Entropy (cal/(K*mol))
#         'dh',               # Enthalpy (kcal/mol)
#         'dg',               # Gibbs free energy
#         'tm',               # Melting temperature (deg. Celsius)
#         'ascii_structure'   # ASCII representation of structure
#     ]
# )
# NULLTHERMORESULT = THERMORESULT(False, 0, 0, 0, 0, '')
# def calcTm(seq, mv_conc=50, dv_conc=0, dntp_conc=0.8, dna_conc=50,
#            max_nn_length=60, tm_method='santalucia',
#            salt_corrections_method='santalucia'):
# def _parse_ntthal(ntthal_output):
# def calcThermo(seq1, seq2, calc_type='ANY', mv_conc=50, dv_conc=0,
#                  dntp_conc=0.8, dna_conc=50, temp_c=37, max_loop=30,
#                  temp_only=False):
# def calcHairpin(seq, mv_conc=50, dv_conc=0, dntp_conc=0.8, dna_conc=50,
#                  temp_c=37, max_loop=30, temp_only=False):
# def calcHeterodimer(seq1, seq2, mv_conc=50, dv_conc=0, dntp_conc=0.8,
#                      dna_conc=50, temp_c=37, max_loop=30, temp_only=False):
# def calcHomodimer(seq, mv_conc=50, dv_conc=0, dntp_conc=0.8,
#                    dna_conc=50, temp_c=37, max_loop=30, temp_only=False):
# def calcEndStability(seq1, seq2, mv_conc=50, dv_conc=0, dntp_conc=0.8,
#                      dna_conc=50, temp_c=37, max_loop=30, temp_only=False):
# def assessOligo(seq):
#     def _formatBoulderIO(p3_args):
#     def _parseBoulderIO(boulder_str):
#     def _parseMultiRecordBoulderIO(boulder_str):
#     def _formatBoulderIO(p3_args):
#     def _parseBoulderIO(boulder_str):
#     def _parseMultiRecordBoulderIO(boulder_str):
# def designPrimers(p3_args, input_log=None, output_log=None, err_log=None):


import unittest
import random
import sys
    import resource
from time import sleep
from primer3 import (
    bindings,
    wrappers
)
            self.randArgs()
            binding_tm = bindings.calcTm(
                seq=self.seq1,
                mv_conc=self.mv_conc,
                dv_conc=self.dv_conc,
                dntp_conc=self.dntp_conc,
                dna_conc=self.dna_conc
            )
            wrapper_tm = wrappers.calcTm(
                seq=self.seq1,
                mv_conc=self.mv_conc,
                dv_conc=self.dv_conc,
                dntp_conc=self.dntp_conc,
                dna_conc=self.dna_conc
            )
            self.assertEqual(int(binding_tm), int(wrapper_tm))

    def test_calcHairpin(self):
        for _ in range(100):
            self.randArgs()
            binding_res = bindings.calcHairpin(
                seq=self.seq1,
                mv_conc=self.mv_conc,
                dv_conc=self.dv_conc,
                dntp_conc=self.dntp_conc,
                dna_conc=self.dna_conc,
                temp_c=self.temp_c,
                max_loop=self.max_loop,
                output_structure=True
            )

# Path: primer3/bindings.py
# PRIMER3_HOME = os.environ['PRIMER3HOME']
# _THERMO_ANALYSIS = thermoanalysis.ThermoAnalysis()
# def _setThermoArgs(mv_conc=50, dv_conc=0, dntp_conc=0.8, dna_conc=50,
#                    temp_c=37, max_loop=30, tm_method='santalucia',
#                    salt_corrections_method='santalucia', **kwargs):
# def calcHairpin(seq, mv_conc=50.0, dv_conc=0.0, dntp_conc=0.8, dna_conc=50.0,
#                 temp_c=37, max_loop=30, output_structure=False):
# def calcHomodimer(seq, mv_conc=50, dv_conc=0, dntp_conc=0.8, dna_conc=50,
#                   temp_c=37, max_loop=30, output_structure=False):
# def calcHeterodimer(seq1, seq2, mv_conc=50, dv_conc=0, dntp_conc=0.8,
#                     dna_conc=50, temp_c=37, max_loop=30,
#                     output_structure=False):
# def calcEndStability(seq1, seq2, mv_conc=50, dv_conc=0, dntp_conc=0.8,
#                      dna_conc=50, temp_c=37, max_loop=30):
# def calcTm(seq, mv_conc=50, dv_conc=0, dntp_conc=0.8, dna_conc=50,
#            max_nn_length=60, tm_method='santalucia',
#            salt_corrections_method='santalucia'):
# def designPrimers(seq_args, global_args=None, misprime_lib=None,
#                   mishyb_lib=None, debug=False):
# def setP3Globals(global_args, misprime_lib=None, mishyb_lib=None):
# def setP3SeqArgs(seq_args):
# def runP3Design(debug=False):
# 
# Path: primer3/wrappers.py
# LOCAL_DIR = os.path.dirname(os.path.realpath(__file__))
# PRIMER3_HOME = os.environ.get('PRIMER3HOME')
# THERMO_PATH = pjoin(PRIMER3_HOME, 'primer3_config/')
# DEV_NULL = open(os.devnull, 'wb')
# THERMORESULT = namedtuple('thermoresult', [
#         'result',           # True if a structure is present
#         'ds',               # Entropy (cal/(K*mol))
#         'dh',               # Enthalpy (kcal/mol)
#         'dg',               # Gibbs free energy
#         'tm',               # Melting temperature (deg. Celsius)
#         'ascii_structure'   # ASCII representation of structure
#     ]
# )
# NULLTHERMORESULT = THERMORESULT(False, 0, 0, 0, 0, '')
# def calcTm(seq, mv_conc=50, dv_conc=0, dntp_conc=0.8, dna_conc=50,
#            max_nn_length=60, tm_method='santalucia',
#            salt_corrections_method='santalucia'):
# def _parse_ntthal(ntthal_output):
# def calcThermo(seq1, seq2, calc_type='ANY', mv_conc=50, dv_conc=0,
#                  dntp_conc=0.8, dna_conc=50, temp_c=37, max_loop=30,
#                  temp_only=False):
# def calcHairpin(seq, mv_conc=50, dv_conc=0, dntp_conc=0.8, dna_conc=50,
#                  temp_c=37, max_loop=30, temp_only=False):
# def calcHeterodimer(seq1, seq2, mv_conc=50, dv_conc=0, dntp_conc=0.8,
#                      dna_conc=50, temp_c=37, max_loop=30, temp_only=False):
# def calcHomodimer(seq, mv_conc=50, dv_conc=0, dntp_conc=0.8,
#                    dna_conc=50, temp_c=37, max_loop=30, temp_only=False):
# def calcEndStability(seq1, seq2, mv_conc=50, dv_conc=0, dntp_conc=0.8,
#                      dna_conc=50, temp_c=37, max_loop=30, temp_only=False):
# def assessOligo(seq):
#     def _formatBoulderIO(p3_args):
#     def _parseBoulderIO(boulder_str):
#     def _parseMultiRecordBoulderIO(boulder_str):
#     def _formatBoulderIO(p3_args):
#     def _parseBoulderIO(boulder_str):
#     def _parseMultiRecordBoulderIO(boulder_str):
# def designPrimers(p3_args, input_log=None, output_log=None, err_log=None):


# Path: tests/test_thermoanalysis.py
import unittest
import random
import sys
    import resource
from time import sleep
from primer3 import (
    bindings,
    wrappers
)

            self.randArgs()
            binding_tm = bindings.calcTm(
                seq=self.seq1,
                mv_conc=self.mv_conc,
                dv_conc=self.dv_conc,
                dntp_conc=self.dntp_conc,
                dna_conc=self.dna_conc
            )
            wrapper_tm = wrappers.calcTm(
                seq=self.seq1,
                mv_conc=self.mv_conc,
                dv_conc=self.dv_conc,
                dntp_conc=self.dntp_conc,
                dna_conc=self.dna_conc
            )
            self.assertEqual(int(binding_tm), int(wrapper_tm))

    def test_calcHairpin(self):
        for _ in range(100):
            self.randArgs()
            binding_res = bindings.calcHairpin(
                seq=self.seq1,
                mv_conc=self.mv_conc,
                dv_conc=self.dv_conc,
                dntp_conc=self.dntp_conc,
                dna_conc=self.dna_conc,
                temp_c=self.temp_c,
                max_loop=self.max_loop,
                output_structure=True
            )

            wrapper_res = wrappers.calcHairpin(