# Path: pyPaSWAS/Core/Exceptions.py
# class InvalidOptionException(Exception):
#     '''
#     This class is used to give a consistent user interface to exceptions that are specific for pyPaSWAS.
#     '''
# 
# Path: pyPaSWAS/pypaswasall.py
# class Pypaswas(object):
#     def __init__(self, config=None):
#     def _get_default_logger(self):
#     def _get_formatter(self, results):
#     def _set_outfile(self):
#     def _get_query_sequences(self, queryfile, start =0, end=None):
#     def _get_target_sequences(self, databasefile, start =0, end=None):
#     def _set_scoring_matrix(self):
#     def _set_output_format(self):
#     def _set_program(self):
#     def run(self):


import sys
import unittest
import tempfile
import shutil
from pkg_resources import resource_filename  #@UnresolvedImport
from pyPaSWAS.Core.Exceptions import InvalidOptionException
from pyPaSWAS import pypaswasall
'''
Created on March 13, 2013

@author: tbeek
'''


class Test(unittest.TestCase):
    ''' Runs the application as the end-user would, testing for correct exception handling
        as well as final output checks comparing generated output to reference (curated)
        output. '''

    def setUp(self):
        # Create pyPaSWAS instance
        self.instance = pypaswasall.Pypaswas()
        # Input files
        self.input_faa_1 = resource_filename(__name__, 'data/query_fasta.faa')
        self.input_faa_2 = resource_filename(__name__, 'data/target_fasta.faa')
        self.input_gb_1 = resource_filename(__name__, 'data/query_genbank.gb')
        self.input_gb_2 = resource_filename(__name__, 'data/target_genbank.gb')
        self.outdir = tempfile.mkdtemp(prefix='test_pypaswas_aligner')

    def test_pypaswas_aligner_invalid_options(self):
        ''' This test checks the raised exception when arguments are missing or incorrect '''
        # Missing arguments, this should raise an InvalidOptionException
        sys.argv = [__name__]

# Path: pyPaSWAS/Core/Exceptions.py
# class InvalidOptionException(Exception):
#     '''
#     This class is used to give a consistent user interface to exceptions that are specific for pyPaSWAS.
#     '''
# 
# Path: pyPaSWAS/pypaswasall.py
# class Pypaswas(object):
#     def __init__(self, config=None):
#     def _get_default_logger(self):
#     def _get_formatter(self, results):
#     def _set_outfile(self):
#     def _get_query_sequences(self, queryfile, start =0, end=None):
#     def _get_target_sequences(self, databasefile, start =0, end=None):
#     def _set_scoring_matrix(self):
#     def _set_output_format(self):
#     def _set_program(self):
#     def run(self):


# Path: pyPaSWAS/Core/test/test_pypaswasall.py
import sys
import unittest
import tempfile
import shutil
from pkg_resources import resource_filename  #@UnresolvedImport
from pyPaSWAS.Core.Exceptions import InvalidOptionException
from pyPaSWAS import pypaswasall

'''
Created on March 13, 2013

@author: tbeek
'''


class Test(unittest.TestCase):
    ''' Runs the application as the end-user would, testing for correct exception handling
        as well as final output checks comparing generated output to reference (curated)
        output. '''

    def setUp(self):
        # Create pyPaSWAS instance
        self.instance = pypaswasall.Pypaswas()
        # Input files
        self.input_faa_1 = resource_filename(__name__, 'data/query_fasta.faa')
        self.input_faa_2 = resource_filename(__name__, 'data/target_fasta.faa')
        self.input_gb_1 = resource_filename(__name__, 'data/query_genbank.gb')
        self.input_gb_2 = resource_filename(__name__, 'data/target_genbank.gb')
        self.outdir = tempfile.mkdtemp(prefix='test_pypaswas_aligner')

    def test_pypaswas_aligner_invalid_options(self):
        ''' This test checks the raised exception when arguments are missing or incorrect '''
        # Missing arguments, this should raise an InvalidOptionException
        sys.argv = [__name__]

        self.assertRaises(InvalidOptionException, self.instance.run)