Ejemplo n.º 1
0
 def test(self):
     old_flags = gc.getMonitorGlobal()
     gc.setMonitorGlobal(True)
     try:
         f(self, force_collect=True)
     finally:
         gc.setMonitorGlobal(old_flags)
Ejemplo n.º 2
0
 def setUpClass(cls):
     #Jython-specific block:
     try:
         cls.savedJythonGCFlags = gc.getJythonGCFlags()
         gc.setMonitorGlobal(True)
     except Exception:
         pass
Ejemplo n.º 3
0
 def setUpClass(cls):
     #Jython-specific block:
     try:
         cls.savedJythonGCFlags = gc.getJythonGCFlags()
         gc.setMonitorGlobal(True)
     except Exception:
         pass
Ejemplo n.º 4
0
 def test(self):
     old_flags = gc.getMonitorGlobal()
     gc.setMonitorGlobal(True)
     try:
         f(self, force_collect=True)
     finally:
         gc.setMonitorGlobal(old_flags)
Ejemplo n.º 5
0
 def setUpClass(cls):
     #Jython-specific block:
     try:
         cls.savedJythonGCFlags = gc.getJythonGCFlags()
         gc.addJythonGCFlags(gc.SUPPRESS_TRAVERSE_BY_REFLECTION_WARNING)
         gc.setMonitorGlobal(True)
     except Exception:
         pass
Ejemplo n.º 6
0
 def setUpClass(cls):
     #Jython-specific block:
     try:
         cls.savedJythonGCFlags = gc.getJythonGCFlags()
         gc.setMonitorGlobal(True)
         #since gc module already exists, it would not be caught by monitorGlobal.
         #so we have to monitor it manually:
         gc.monitorObject(gc)
         #the finalizer-related tests need this flag to pass in Jython:
         gc.addJythonGCFlags(gc.DONT_FINALIZE_CYCLIC_GARBAGE)
     except Exception:
         pass
Ejemplo n.º 7
0
 def setUpClass(cls):
     #Jython-specific block:
     try:
         cls.savedJythonGCFlags = gc.getJythonGCFlags()
         gc.setMonitorGlobal(True)
         #since gc module already exists, it would not be caught by monitorGlobal.
         #so we have to monitor it manually:
         gc.monitorObject(gc)
         #the finalizer-related tests need this flag to pass in Jython:
         gc.addJythonGCFlags(gc.DONT_FINALIZE_CYCLIC_GARBAGE)
     except Exception:
         pass