1. Pypy
  2. Untitled project
  3. pypy


Armin Rigo  committed ee26ba2 Merge

Merged in bdkearns/pypy (pull request #100: replace some obsolete use of time with rctime, more test_ioctl fixes):

The changes from 'time' to 'rctime' are not really needed (since cc03c3f718b4), but don't hurt and are a step towards killing pypy/module/time.

  • Participants
  • Parent commits cc03c3f, bdc4935
  • Branches default

Comments (0)

Files changed (3)

File pypy/module/fcntl/test/test_fcntl.py

View file
 class AppTestFcntl:
-    spaceconfig = dict(usemodules=('fcntl', 'array', 'struct', 'termios', 'select', 'time'))
+    spaceconfig = dict(usemodules=('fcntl', 'array', 'struct', 'termios', 'select', 'rctime'))
     def setup_class(cls):
         tmpprefix = str(udir.ensure('test_fcntl', dir=1).join('tmp_'))
         cls.w_tmp = cls.space.wrap(tmpprefix)
         if child_pid == 0:
             # We're the child
-            return
+            os._exit(0)
+            # We're the parent, we want TIOCGPGRP calls after child started but before it dies
+            time.sleep(0)
             buf = array.array('i', [0])
             res = fcntl.ioctl(mfd, TIOCGPGRP, buf, True)
             assert res == 0

File pypy/module/imp/test/test_import.py

View file
 class AppTestMultithreadedImp(object):
-    spaceconfig = dict(usemodules=['thread', 'time'])
+    spaceconfig = dict(usemodules=['thread', 'rctime'])
     def setup_class(cls):
         #if not conftest.option.runappdirect:

File pypy/module/thread/test/support.py

View file
 class GenericTestThread:
-    spaceconfig = dict(usemodules=('thread', 'time', 'signal'))
+    spaceconfig = dict(usemodules=('thread', 'rctime', 'signal'))
     def setup_class(cls):
         if cls.runappdirect: