Failing test.
Created by: jfjlaros
The test TestScheduler.test_xlsx_file
fails.
================================================================================================================================ FAILURES ================================================================================================================================ ______________________________________________________________________________________________________________________ TestScheduler.test_xlsx_file ______________________________________________________________________________________________________________________
self = <test_scheduler.TestScheduler object at 0x7f58906ba290>
def test_xlsx_file(self):
"""
Office Open XML Spreadsheet input for batch job.
"""
path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'data',
'batch_input.xlsx')
batch_file = open(path, 'rb')
expected = [['AB026906.1:c.274G>T',
'OK'],
['AL449423.14(CDKN2A_v002):c.5_400del',
'OK']]
self._batch_job(batch_file, expected, 'syntax-checker')
tests/test_scheduler.py:327:
tests/test_scheduler.py:39: in _batch_job job_type, argument=argument)
self = <mutalyzer.Scheduler.Scheduler instance at 0x7f5890661f38>, email = 'test@test.test', queue = None, columns = 1, job_type = 'syntax-checker', argument = None, create_download_url = None
def addJob(self, email, queue, columns, job_type, argument=None,
create_download_url=None):
"""
Add a job to the Database and start the BatchChecker.
@arg email: e-mail address of batch supplier
@type email: unicode
@arg queue: A list of jobs
@type queue: list
@arg columns: The number of columns.
@type columns: int
@arg job_type: The type of Batch Job that should be run
@type job_type:
@arg argument: Batch Arguments, for now only build info
@type argument:
@arg create_download_url: Function accepting a result_id and returning
the URL for downloading the batch job
result. Can be None.
@type create_download_url: function
@return: result_id
@rtype:
"""
# Add jobs to the database
batch_job = BatchJob(job_type, email=email, argument=argument)
if create_download_url:
batch_job.download_url = create_download_url(batch_job.result_id)
session.add(batch_job)
for i, inputl in enumerate(queue): # NOTE: # This is a very dirty way to skip entries before they are fed # to the batch processes. This is needed for e.g. an empty line # or because the File Module noticed wrong formatting. These lines # used to be discarded but are now preserved by the escape string. # The benefit of this is that the users input will match the # output in terms of input line and outputline. if inputl.startswith("~!"): #Dirty Escape
E TypeError: 'NoneType' object is not iterable
mutalyzer/Scheduler.py:752: TypeError ================================================================================================================= 1 failed, 428 passed in 43.06 seconds ==================================================================================================================