summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_nis.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1999-01-28 04:54:33 (GMT)
committerBarry Warsaw <barry@python.org>1999-01-28 04:54:33 (GMT)
commit72588741dd8e2d54704e6957da63be81efa20919 (patch)
tree800c256588699a969631df4a0780cf2ba595c180 /Lib/test/test_nis.py
parent2133287c3ed12557cb1dde84ffe928e1f04eeda9 (diff)
downloadcpython-72588741dd8e2d54704e6957da63be81efa20919.zip
cpython-72588741dd8e2d54704e6957da63be81efa20919.tar.gz
cpython-72588741dd8e2d54704e6957da63be81efa20919.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_nis.py')
-rw-r--r--Lib/test/test_nis.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_nis.py b/Lib/test/test_nis.py
index b28a672..b73faf9 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: