From: Barry Warsaw Date: Thu, 28 Jan 1999 04:54:33 +0000 (+0000) Subject: Slight reworking of this test. If nis.maps() gives a nis.error, then X-Git-Tag: v1.5.2b2~247 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72588741dd8e2d54704e6957da63be81efa20919;p=thirdparty%2FPython%2Fcpython.git Slight reworking of this test. If nis.maps() gives a nis.error, then raise an ImportError if not running verbose. This signals to the regression framework that this test isn't applicable. --- diff --git a/Lib/test/test_nis.py b/Lib/test/test_nis.py index b28a6722d2bc..b73faf9e8977 100644 --- a/Lib/test/test_nis.py +++ b/Lib/test/test_nis.py @@ -3,10 +3,13 @@ import nis print 'nis.maps()' try: - # the following could fail if NIS isn't active maps = nis.maps() except nis.error, msg: - raise TestFailed, msg + # NIS is probably not active, so this test isn't useful + if verbose: + raise TestFailed, msg + # only do this if running under the regression suite + raise ImportError, msg done = 0 for nismap in maps: