def test_readError(self):
        """
        If there is an error reading the contents of the hosts file,
        L{searchFileForAll} returns an empty list.
        """
        self.assertEqual(
            [], searchFileForAll(self.path(), b"example.com"))

        If there is an error reading the contents of the hosts file,
        L{searchFileForAll} returns an empty list.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_hosts.py