Author: mattip <[email protected]>
Branch: 
Changeset: r73730:742921282679
Date: 2014-09-28 01:26 +0300
http://bitbucket.org/pypy/pypy/changeset/742921282679/

Log:    move test to more appropriate class

diff --git a/pypy/module/select/test/test_select.py 
b/pypy/module/select/test/test_select.py
--- a/pypy/module/select/test/test_select.py
+++ b/pypy/module/select/test/test_select.py
@@ -244,20 +244,6 @@
         raises(OverflowError, pollster.modify, 1, -1)
         raises(OverflowError, pollster.modify, 1, 1 << 64)
 
-    def test_resize_list_in_select(self):
-        import select
-        class Foo(object):
-            def fileno(self):
-                print len(l)
-                if len(l) < 100:
-                    l.append(Foo())
-                return 0
-        l = [Foo()]
-        select.select(l, (), (), 0)
-        assert 1 <= len(l) <= 100    
-        # ^^^ CPython gives 100, PyPy gives 1.  I think both are OK as
-        # long as there is no crash.
-
 
 class AppTestSelectWithPipes(_AppTestSelect):
     "Use a pipe to get pairs of file descriptors"
@@ -318,6 +304,20 @@
             for fd in rfds:
                 os.close(fd)
 
+    def test_resize_list_in_select(self):
+        import select
+        class Foo(object):
+            def fileno(self):
+                print len(l)
+                if len(l) < 100:
+                    l.append(Foo())
+                return 0
+        l = [Foo()]
+        select.select(l, (), (), 0)
+        assert 1 <= len(l) <= 100    
+        # ^^^ CPython gives 100, PyPy gives 1.  I think both are OK as
+        # long as there is no crash.
+
 
 class AppTestSelectWithSockets(_AppTestSelect):
     """Same tests with connected sockets.
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to