Added libbe.TESTING (defaults to False).
authorW. Trevor King <wking@drexel.edu>
Fri, 4 Dec 2009 02:19:54 +0000 (21:19 -0500)
committerW. Trevor King <wking@drexel.edu>
Fri, 4 Dec 2009 02:19:54 +0000 (21:19 -0500)
commit2ba535acb1f03fb7d1bdb57e4173d55661d300da
tree935bca20ab4dd0122e45eb5b783bb96c52a3012b
parent193bb7dc4fdb02ec1e79dcfacecdb4c352549a15
Added libbe.TESTING (defaults to False).

This flag allows us to skip unittest and testsuite declaration if we
woln't need them.  It speeds up simple be calls a suprising amount.
With Testing=True (the old behavior):
  wking@thor:be.wtk$ time ./be > /dev/null

  real    0m0.393s
  user    0m0.340s
  sys     0m0.048s
With TESTING=False (the new behavior):
  be.wtk$ time ./be > /dev/null

  real    0m0.216s
  user    0m0.152s
  sys     0m0.064s

This adjustment was inspired by Jakub Wilk's Debian bug:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559295
26 files changed:
becommands/import_xml.py
libbe/__init__.py
libbe/arch.py
libbe/beuuid.py
libbe/bug.py
libbe/bugdir.py
libbe/bzr.py
libbe/cmdutil.py
libbe/comment.py
libbe/config.py
libbe/darcs.py
libbe/diff.py
libbe/editor.py
libbe/encoding.py
libbe/git.py
libbe/hg.py
libbe/mapfile.py
libbe/plugin.py
libbe/properties.py
libbe/settings_object.py
libbe/subproc.py
libbe/tree.py
libbe/upgrade.py
libbe/utility.py
libbe/vcs.py
test.py