@unittest.skipIf(sys.flags.optimize >= 2, "need __doc__")
def test_main_help(self):
s = self.run_main(switches=['-h'])
- # Note: It's not clear that the trailing space was intended as part of
- # the help text, but since it's there, check for it.
- self.assertEqual(s, timeit.__doc__ + ' ')
+ self.assertEqual(s, timeit.__doc__)
def test_main_verbose(self):
s = self.run_main(switches=['-v'])
timeit(string, string) -> float
repeat(string, string) -> list
default_timer() -> float
-
"""
import gc
precision += 1
verbose += 1
if o in ("-h", "--help"):
- print(__doc__, end=' ')
+ print(__doc__, end="")
return 0
setup = "\n".join(setup) or "pass"