

def test_recursiveConfiguration(self):
    '\n        Recursive DNS lookups, if enabled, should be a last-resort option.\n        Any other lookup method (cache, local lookup, etc.) should take\n        precedence over recursive lookups\n        '
    options = Options()
    options.parseOptions(['--hosts-file', 'hosts.txt', '--recursive'])
    (ca, cl) = _buildResolvers(options)
    for x in cl:
        if isinstance(x, ResolverChain):
            recurser = x.resolvers[(- 1)]
            if isinstance(recurser, Resolver):
                recurser._parseCall.cancel()
    self.assertIsInstance(cl[(- 1)], ResolverChain)

dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/names/test/test_tap.py OptionsTests.test_recursiveConfiguration/original