# Path: crumbs/utils/bin_utils.py
# SEQ_BIN_DIR = os.path.join(BIN_DIR, 'seq')


import unittest
import os.path
from tempfile import NamedTemporaryFile
from subprocess import check_output, CalledProcessError
from crumbs.utils.bin_utils import SEQ_BIN_DIR
    if content is None:
        content = ''
    fhand = NamedTemporaryFile()
    fhand.write(content)
    fhand.flush()
    return fhand


class FastaQualToFastqTest(unittest.TestCase):
    'It test the convert_format binary'

    def test_fastaqual_to_fasta(self):
        'It test fastaqual to fastq binary'
        fasta_fhand = _make_fhand(FASTA)
        qual_fhand = _make_fhand(QUAL)

        seqio_bin = os.path.join(SEQ_BIN_DIR, 'fastaqual_to_fastq')
        assert 'usage' in check_output([seqio_bin, '-h'])

        out_fhand = NamedTemporaryFile()
        check_output([seqio_bin, '-o', out_fhand.name,
                      fasta_fhand.name, qual_fhand.name])
        assert "@seq1\natctagtc\n+" in open(out_fhand.name).read()


class SeqioBinTest(unittest.TestCase):
    'It test the convert_format binary'

    def test_seqio_bin(self):
        'It test the seqio binary'

# Path: crumbs/utils/bin_utils.py
# SEQ_BIN_DIR = os.path.join(BIN_DIR, 'seq')


# Path: test/seq/test_convert_format.py
import unittest
import os.path
from tempfile import NamedTemporaryFile
from subprocess import check_output, CalledProcessError
from crumbs.utils.bin_utils import SEQ_BIN_DIR

    if content is None:
        content = ''
    fhand = NamedTemporaryFile()
    fhand.write(content)
    fhand.flush()
    return fhand


class FastaQualToFastqTest(unittest.TestCase):
    'It test the convert_format binary'

    def test_fastaqual_to_fasta(self):
        'It test fastaqual to fastq binary'
        fasta_fhand = _make_fhand(FASTA)
        qual_fhand = _make_fhand(QUAL)

        seqio_bin = os.path.join(SEQ_BIN_DIR, 'fastaqual_to_fastq')
        assert 'usage' in check_output([seqio_bin, '-h'])

        out_fhand = NamedTemporaryFile()
        check_output([seqio_bin, '-o', out_fhand.name,
                      fasta_fhand.name, qual_fhand.name])
        assert "@seq1\natctagtc\n+" in open(out_fhand.name).read()


class SeqioBinTest(unittest.TestCase):
    'It test the convert_format binary'

    def test_seqio_bin(self):
        'It test the seqio binary'

        seqio_bin = os.path.join(SEQ_BIN_DIR, 'convert_format')