1 from test
import test_support
4 nis
= test_support
.import_module('nis')
6 class NisTests(unittest
.TestCase
):
10 except nis
.error
, msg
:
11 # NIS is probably not active, so this test isn't useful
12 if test_support
.verbose
:
13 print "Test Skipped:", msg
14 # Can't raise SkipTest as regrtest only recognizes the exception
18 # On some systems, this map is only accessible to the
20 maps
.remove("passwd.adjunct.byname")
26 mapping
= nis
.cat(nismap
)
27 for k
, v
in mapping
.items():
30 if nis
.match(k
, nismap
) != v
:
31 self
.fail("NIS match failed for key `%s' in map `%s'" % (k
, nismap
))
33 # just test the one key, otherwise this test could take a
41 test_support
.run_unittest(NisTests
)
43 if __name__
== '__main__':