From b35dfdf10b2f58a0632d0a0542bd8232a39b0391 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 20 Nov 2009 14:29:01 -0500 Subject: 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. --- test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test.py') 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) -- cgit