예제 #1
0
 def test_dochelper(self):
     EnvOption.set_prefix('MYPREFIX_')
     os.environ['MYPREFIX_A_OPT'] = 'FUZZ'
     returned = dochelper(__doc__)
     expected = __doc__.replace(
         "-a --a-opt OPT  # An example long option",
         "-a --a-opt OPT  # An example long option [default: FUZZ]")
     print(returned)
     print(expected)
     assert returned == expected
예제 #2
0
 def test_dochelper(self):
     EnvOption.set_prefix('MYPREFIX_')
     os.environ['MYPREFIX_A_OPT'] = 'FUZZ'
     returned = dochelper(__doc__)
     expected = __doc__.replace(
         "-a --a-opt OPT  # An example long option",
         "-a --a-opt OPT  # An example long option [default: FUZZ]")
     print(returned)
     print(expected)
     assert returned == expected
예제 #3
0
 def setup(self):
     os.environ = {}
     EnvOption.set_prefix(None)
예제 #4
0
 def setup(self):
     os.environ = {}
     EnvOption.set_prefix(None)