from __future__ import (absolute_import, division, print_function,
                        unicode_literals)

import gc
import os
from nose.plugins import Plugin


class PerformGC(Plugin):
    """This plugin adds option to call ``gc.collect`` after each test"""
    enabled = False

    def options(self, parser, env=os.environ):
        env_opt = 'PERFORM_GC'
        parser.add_option('--perform-gc', action='store_true',
                          dest='performGC', default=env.get(env_opt, False),
                          help='Call gc.collect() after each test')

    def configure(self, options, conf):
        if not self.can_configure:
            return

        self.enabled = getattr(options, 'performGC', False)

    def afterTest(self, test):
        gc.collect()

70023c1d2edb30ae41133679b451fe80a43bd9f9
<mask token>


class PerformGC(Plugin):
    <mask token>
    <mask token>

    def options(self, parser, env=os.environ):
        env_opt = 'PERFORM_GC'
        parser.add_option('--perform-gc', action='store_true', dest=
            'performGC', default=env.get(env_opt, False), help=
            'Call gc.collect() after each test')
    <mask token>
    <mask token>

<mask token>


class PerformGC(Plugin):
    <mask token>
    <mask token>

    def options(self, parser, env=os.environ):
        env_opt = 'PERFORM_GC'
        parser.add_option('--perform-gc', action='store_true', dest=
            'performGC', default=env.get(env_opt, False), help=
            'Call gc.collect() after each test')

    def configure(self, options, conf):
        if not self.can_configure:
            return
        self.enabled = getattr(options, 'performGC', False)
    <mask token>

<mask token>


class PerformGC(Plugin):
    """This plugin adds option to call ``gc.collect`` after each test"""
    enabled = False

    def options(self, parser, env=os.environ):
        env_opt = 'PERFORM_GC'
        parser.add_option('--perform-gc', action='store_true', dest=
            'performGC', default=env.get(env_opt, False), help=
            'Call gc.collect() after each test')

    def configure(self, options, conf):
        if not self.can_configure:
            return
        self.enabled = getattr(options, 'performGC', False)

    def afterTest(self, test):
        gc.collect()

from __future__ import absolute_import, division, print_function, unicode_literals
import gc
import os
from nose.plugins import Plugin


class PerformGC(Plugin):
    """This plugin adds option to call ``gc.collect`` after each test"""
    enabled = False

    def options(self, parser, env=os.environ):
        env_opt = 'PERFORM_GC'
        parser.add_option('--perform-gc', action='store_true', dest=
            'performGC', default=env.get(env_opt, False), help=
            'Call gc.collect() after each test')

    def configure(self, options, conf):
        if not self.can_configure:
            return
        self.enabled = getattr(options, 'performGC', False)

    def afterTest(self, test):
        gc.collect()

from __future__ import (absolute_import, division, print_function,
                        unicode_literals)

import gc
import os
from nose.plugins import Plugin


class PerformGC(Plugin):
    """This plugin adds option to call ``gc.collect`` after each test"""
    enabled = False

    def options(self, parser, env=os.environ):
        env_opt = 'PERFORM_GC'
        parser.add_option('--perform-gc', action='store_true',
                          dest='performGC', default=env.get(env_opt, False),
                          help='Call gc.collect() after each test')

    def configure(self, options, conf):
        if not self.can_configure:
            return

        self.enabled = getattr(options, 'performGC', False)

    def afterTest(self, test):
        gc.collect()
