From 580c259b39fa5e639d3fbe00dc24da09c11d282a Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Mon, 14 Jan 2013 08:38:17 +0000 Subject: Make tox run doctests Use 'nosetests --with-doctests' to run any doctests found. We currently only use doctests in a handful of places, but we may as well run them to ensure they work. Make the cfg doctests avoid using the global CONF since we would need to reset its state between each doctest. Fix the cliutils doctests to actually pass. Use 'nosetests --exclude-dir=tests/testmods' to avoid loading the modules from this dir while discovering doctests. The cfg unit tests rely on these modules not having been previously loaded. Change-Id: I19ad70767fa5c8352b994dc963b5d3a7c9d9eb95 --- openstack/common/cliutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openstack/common/cliutils.py') diff --git a/openstack/common/cliutils.py b/openstack/common/cliutils.py index 89a6f62..411bd58 100644 --- a/openstack/common/cliutils.py +++ b/openstack/common/cliutils.py @@ -36,11 +36,11 @@ def validate_args(fn, *args, **kwargs): >>> validate_args(lambda a: None) Traceback (most recent call last): ... - MissingArgs: An argument is missing: a + MissingArgs: An argument is missing >>> validate_args(lambda a, b, c, d: None, 0, c=1) Traceback (most recent call last): ... - MissingArgs: 2 arguments are missing: b, d + MissingArgs: 2 arguments are missing :param fn: the function to check :param arg: the positional arguments supplied -- cgit