From 9df0a853d8949f3ba2b06edaa93b820de40d918e Mon Sep 17 00:00:00 2001 From: Arnold Krille Date: Sun, 13 Mar 2016 18:43:32 +0100 Subject: [PATCH] Fix indentation and newlines according to flake8 --- tests/test_queue.py | 7 ++----- tests/test_worker.py | 8 ++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/test_queue.py b/tests/test_queue.py index 1a51acc..6f91ff9 100644 --- a/tests/test_queue.py +++ b/tests/test_queue.py @@ -242,14 +242,14 @@ class TestQueue(RQTestCase): self.assertEqual(job.func, say_hello) self.assertEqual(job.origin, fooq.name) self.assertEqual(job.args[0], 'for Foo', - 'Foo should be dequeued first.') + 'Foo should be dequeued first.') job, queue = Queue.dequeue_any([fooq, barq], None) self.assertEqual(queue, barq) self.assertEqual(job.func, say_hello) self.assertEqual(job.origin, barq.name) self.assertEqual(job.args[0], 'for Bar', - 'Bar should be dequeued second.') + 'Bar should be dequeued second.') def test_dequeue_any_ignores_nonexisting_jobs(self): """Dequeuing (from any queue) silently ignores non-existing jobs.""" @@ -355,7 +355,6 @@ class TestQueue(RQTestCase): # DeferredJobRegistry should also be empty self.assertEqual(registry.get_job_ids(), []) - def test_enqueue_dependents_on_multiple_queues(self): """Enqueueing dependent jobs on multiple queues pushes jobs in the queues and removes them from DeferredJobRegistry for each different queue.""" @@ -392,8 +391,6 @@ class TestQueue(RQTestCase): self.assertEqual(registry_1.get_job_ids(), []) self.assertEqual(registry_2.get_job_ids(), []) - - def test_enqueue_job_with_dependency(self): """Jobs are enqueued only when their dependencies are finished.""" # Job with unfinished dependency is not immediately enqueued diff --git a/tests/test_worker.py b/tests/test_worker.py index 97c461a..bae0f6f 100644 --- a/tests/test_worker.py +++ b/tests/test_worker.py @@ -83,11 +83,11 @@ class TestWorker(RQTestCase): fooq, barq = Queue('foo'), Queue('bar') w = Worker([fooq, barq]) self.assertEqual(w.work(burst=True), False, - 'Did not expect any work on the queue.') + 'Did not expect any work on the queue.') fooq.enqueue(say_hello, name='Frank') self.assertEqual(w.work(burst=True), True, - 'Expected at least some work done.') + 'Expected at least some work done.') def test_worker_ttl(self): """Worker ttl.""" @@ -103,7 +103,7 @@ class TestWorker(RQTestCase): w = Worker([q]) job = q.enqueue('tests.fixtures.say_hello', name='Frank') self.assertEqual(w.work(burst=True), True, - 'Expected at least some work done.') + 'Expected at least some work done.') self.assertEqual(job.result, 'Hi there, Frank!') def test_job_times(self): @@ -117,7 +117,7 @@ class TestWorker(RQTestCase): self.assertIsNone(job.started_at) self.assertIsNone(job.ended_at) self.assertEqual(w.work(burst=True), True, - 'Expected at least some work done.') + 'Expected at least some work done.') self.assertEqual(job.result, 'Hi there, Stranger!') after = utcnow() job.refresh()