/usr/lib/python3/dist-packages/pyutilib/th/nose_gc.py is in python3-pyutilib 5.3.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | """This module defines a nose plugin to forceably run the Python garbage collector before and after every test.
Use the following command-line option with nosetests ::
nosetests --with-forced-gc
"""
from gc import collect
from nose.plugins.base import Plugin
class ForcedGC(Plugin):
"""Force calls to the Python garbage collector before and after each test."""
name = 'forced-gc'
score = 5000 # Run early
def beforeTest(self, test):
collect()
def afterTest(self, test):
collect()
|