Skip to content

Commit

Permalink
Flake8.
Browse files Browse the repository at this point in the history
  • Loading branch information
nvie committed Feb 22, 2012
1 parent e807748 commit 91fff48
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ def test_work_and_quit(self):
"""Worker processes work, then quits."""
fooq, barq = Queue('foo'), Queue('bar')
w = Worker([fooq, barq])
self.assertEquals(w.work(burst=True), False, 'Did not expect any work on the queue.')
self.assertEquals(w.work(burst=True), False,
'Did not expect any work on the queue.')

fooq.enqueue(say_hello, name='Frank')
self.assertEquals(w.work(burst=True), True, 'Expected at least some work done.')
self.assertEquals(w.work(burst=True), True,
'Expected at least some work done.')

def test_work_is_unreadable(self):
"""Unreadable jobs are put on the failed queue."""
Expand Down Expand Up @@ -79,13 +81,13 @@ def test_work_fails(self):
job = Job.fetch(job.id)
self.assertEquals(job.origin, q.name)

# should be the original enqueued_at date, not the date of enqueueing to
# the failed queue
# Should be the original enqueued_at date, not the date of enqueueing
# to the failed queue
self.assertEquals(job.enqueued_at, enqueued_at_date)
self.assertIsNotNone(job.exc_info) # should contain exc_info


def test_cancelled_jobs_arent_executed(self):
def test_cancelled_jobs_arent_executed(self): # noqa
"""Cancelling jobs."""

SENTINEL_FILE = '/tmp/rq-tests.txt'
Expand Down Expand Up @@ -132,7 +134,7 @@ def test_cleaning_up_of_jobs(self):
assert self.testconn.exists(job_without_rv.key) == False


def test_timeouts(self):
def test_timeouts(self): # noqa
"""Worker kills jobs after timeout."""
sentinel_file = '/tmp/.rq_sentinel'

Expand Down

0 comments on commit 91fff48

Please sign in to comment.