Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7258874

Browse files
committed
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.
1 parent 2133287 commit 7258874

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Lib/test/test_nis.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33

44
print 'nis.maps()'
55
try:
6-
# the following could fail if NIS isn't active
76
maps = nis.maps()
87
except nis.error, msg:
9-
raise TestFailed, msg
8+
# NIS is probably not active, so this test isn't useful
9+
if verbose:
10+
raise TestFailed, msg
11+
# only do this if running under the regression suite
12+
raise ImportError, msg
1013

1114
done = 0
1215
for nismap in maps:

0 commit comments

Comments
 (0)