summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/noseplugin.py
blob: 8247d2fd8c160b65ff50bcd02ada44597c9cb145 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
from nose.plugins import Plugin

parser_option = None


class OptionParser(Plugin):

    def options(self, parser, env=os.environ):
        super(OptionParser, self).options(parser, env=env)
        parser.add_option('--use-local', action="store_true", dest="use_local", default=False)

    def configure(self, options, conf):
        super(OptionParser, self).configure(options, conf)
        global parser_option
        parser_option = options

        if not self.enabled:
            return

    def finalize(self, result):
        pass