]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
queues_test: Fix comment
authorBen Darnell <ben@bendarnell.com>
Mon, 17 Sep 2018 12:53:08 +0000 (08:53 -0400)
committerBen Darnell <ben@bendarnell.com>
Mon, 17 Sep 2018 12:53:08 +0000 (08:53 -0400)
This test inaccurately described the behavior it was testing.

tornado/test/queues_test.py

index d63882a9de8ac42a14bc8f8ae848b4d3a9f04798..9540213274045cbd369e8428b87273152747da80 100644 (file)
@@ -273,8 +273,11 @@ class QueuePutTest(AsyncTestCase):
 
     @gen_test
     def test_float_maxsize(self):
-        # Non-int maxsize must round down: http://bugs.python.org/issue21723
-        q = queues.Queue(maxsize=1.3)
+        # If a float is passed for maxsize, a reasonable limit should
+        # be enforced, instead of being treated as unlimited.
+        # It happens to be rounded up.
+        # http://bugs.python.org/issue21723
+        q = queues.Queue(maxsize=1.3)  # type: ignore
         self.assertTrue(q.empty())
         self.assertFalse(q.full())
         q.put_nowait(0)