diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-01-23 12:38:00 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-01-26 20:16:38 +0900 |
commit | 3491d5214352586708444bcf41eca16f7ff1d3e6 (patch) | |
tree | 0e2e1b1bce2638475df86a859822e365c2e7cb9d /test/scenario_test/noseplugin.py | |
parent | 1a36b97d46e3a6958c1646398c5354ef74bea24b (diff) |
scenario_test: Change to be able to test the local gobgp program
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/noseplugin.py')
-rw-r--r-- | test/scenario_test/noseplugin.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/scenario_test/noseplugin.py b/test/scenario_test/noseplugin.py new file mode 100644 index 00000000..8247d2fd --- /dev/null +++ b/test/scenario_test/noseplugin.py @@ -0,0 +1,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
\ No newline at end of file |