1. Pypy
  2. Untitled project
  3. pypy

Commits

Philip Jenvey  committed d6525cd

fix test_posix2, it inherits space from the module scope

  • Participants
  • Parent commits daf4a1b
  • Branches default

Comments (0)

Files changed (1)

File pypy/module/posix/test/test_posix2.py

View file
 import signal
 
 def setup_module(mod):
+    usemodules = ['binascii', 'posix', 'struct', 'rctime']
     if os.name != 'nt':
-        mod.space = gettestobjspace(usemodules=['posix', 'fcntl', 'struct'])
+        usemodules += ['fcntl']
     else:
         # On windows, os.popen uses the subprocess module
-        mod.space = gettestobjspace(usemodules=['posix', '_rawffi', 'thread', 'struct'])
+        usemodules += ['_rawffi', 'thread']
+    mod.space = gettestobjspace(usemodules=usemodules)
     mod.path = udir.join('posixtestfile.txt')
     mod.path.write("this is a test")
     mod.path2 = udir.join('test_posix2-')
 
 
 class AppTestPosix:
-    spaceconfig = {
-        "usemodules": ["binascii", "struct", "rctime"],
-    }
 
     def setup_class(cls):
         cls.space = space