summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-11-20 14:29:01 -0500
committerW. Trevor King <wking@drexel.edu>2009-11-20 14:29:01 -0500
commitb35dfdf10b2f58a0632d0a0542bd8232a39b0391 (patch)
tree3e331c64841832a0c15683890aee46a58581def4 /test.py
parent19b3a1d77946b4bbec0788d1ac3270c5cddbd54a (diff)
Adjusted test.py to use an installed vcs by default.
Protects agaist the off chance that the user doesn't have Arch (tla) installed ;). Changed Arch.name from "Arch" to "arch" so that each VCSs .name matches the module name. This allows us to use vcs.VCS_ORDER (a list of module names) to set up the allowed values of BugDir.vcs_name.
Diffstat (limited to 'test.py')
-rw-r--r--test.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test.py b/test.py
index 1f1ffcf..57091c7 100644
--- a/test.py
+++ b/test.py
@@ -8,7 +8,7 @@ When called with module name arguments, only run the doctests from
those modules.
"""
-from libbe import plugin
+from libbe import plugin, vcs
import unittest
import doctest
import sys
@@ -41,9 +41,10 @@ else:
for modname,module in plugin.iter_plugins("becommands"):
suite.addTest(doctest.DocTestSuite(module))
-#for s in suite._tests:
-# print s
-#exit(0)
+_vcs = vcs.installed_vcs()
+vcs.set_preferred_vcs(_vcs.name)
+print 'Using %s as the testing VCS' % _vcs.name
+
result = unittest.TextTestRunner(verbosity=2).run(suite)
numErrors = len(result.errors)