From 0478a9d7f3b8dbbca5d7431b2b675bc4c458bf5b Mon Sep 17 00:00:00 2001 From: Aditya Bansal Date: Sun, 7 May 2017 23:29:57 +0530 Subject: [PATCH] pep8: Add compliance with rule E261 to test_export.py. --- zerver/tests/test_export.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/zerver/tests/test_export.py b/zerver/tests/test_export.py index 3413ddc427..aed2f2f6ac 100644 --- a/zerver/tests/test_export.py +++ b/zerver/tests/test_export.py @@ -79,7 +79,7 @@ class QueryUtilTest(ZulipTestCase): queries = get_queries() - all_msg_ids = set() # type: Set[int] + all_msg_ids = set() # type: Set[int] chunker = query_chunker( queries=queries, id_collector=all_msg_ids, @@ -104,9 +104,9 @@ class QueryUtilTest(ZulipTestCase): chunker = query_chunker( queries=queries, id_collector=all_msg_ids, - chunk_size=7, # use a different size + chunk_size=7, # use a different size ) - list(chunker) # exhaust the iterator + list(chunker) # exhaust the iterator self.assertEqual( len(all_msg_ids), len(Message.objects.filter(sender_id__in=[cordelia.id, hamlet.id])) @@ -120,9 +120,9 @@ class QueryUtilTest(ZulipTestCase): chunker = query_chunker( queries=queries, id_collector=all_msg_ids, - chunk_size=11, # use a different size each time + chunk_size=11, # use a different size each time ) - list(chunker) # exhaust the iterator + list(chunker) # exhaust the iterator self.assertEqual( len(all_msg_ids), len(Message.objects.exclude(sender_id=cordelia.id)) @@ -138,10 +138,10 @@ class QueryUtilTest(ZulipTestCase): chunker = query_chunker( queries=queries, id_collector=all_msg_ids, - chunk_size=13, # use a different size each time + chunk_size=13, # use a different size each time ) with self.assertRaises(AssertionError): - list(chunker) # exercise the iterator + list(chunker) # exercise the iterator # Try to confuse things with ids part of the query... queries = [ @@ -152,10 +152,10 @@ class QueryUtilTest(ZulipTestCase): chunker = query_chunker( queries=queries, id_collector=all_msg_ids, - chunk_size=11, # use a different size each time + chunk_size=11, # use a different size each time ) - self.assertEqual(len(all_msg_ids), 0) # until we actually use the iterator - list(chunker) # exhaust the iterator + self.assertEqual(len(all_msg_ids), 0) # until we actually use the iterator + list(chunker) # exhaust the iterator self.assertEqual(len(all_msg_ids), len(Message.objects.all())) # Verify that we can just get the first chunk with a next() call. @@ -166,9 +166,9 @@ class QueryUtilTest(ZulipTestCase): chunker = query_chunker( queries=queries, id_collector=all_msg_ids, - chunk_size=10, # use a different size each time + chunk_size=10, # use a different size each time ) - first_chunk = next(chunker) # type: ignore + first_chunk = next(chunker) # type: ignore self.assertEqual(len(first_chunk), 10) self.assertEqual(len(all_msg_ids), 10) expected_msg = Message.objects.all()[0:10][5]